|
OpenQuizz
Une application de gestion des contenus pédagogiques
|


Public Member Functions | |
| def | __init__ (self, param_decls, required=None, **attrs) |
| def | human_readable_name (self) |
| def | make_metavar (self) |
| def | get_usage_pieces (self, ctx) |
| def | get_error_hint (self, ctx) |
| def | add_to_parser (self, parser, ctx) |
Public Member Functions inherited from Parameter | |
| def | __init__ (self, param_decls=None, type=None, required=False, default=None, callback=None, nargs=None, metavar=None, expose_value=True, is_eager=False, envvar=None, autocompletion=None) |
| def | __repr__ (self) |
| def | get_default (self, ctx) |
| def | consume_value (self, ctx, opts) |
| def | type_cast_value (self, ctx, value) |
| def | process_value (self, ctx, value) |
| def | value_is_missing (self, value) |
| def | full_process_value (self, ctx, value) |
| def | resolve_envvar_value (self, ctx) |
| def | value_from_envvar (self, ctx) |
| def | handle_parse_result (self, ctx, opts, args) |
| def | get_help_record (self, ctx) |
Static Public Attributes | |
| string | param_type_name = "argument" |
Static Public Attributes inherited from Parameter | |
| string | param_type_name = "parameter" |
Additional Inherited Members | |
Data Fields inherited from Parameter | |
| secondary_opts | |
| type | |
| required | |
| callback | |
| nargs | |
| multiple | |
| expose_value | |
| default | |
| is_eager | |
| metavar | |
| envvar | |
| autocompletion | |
Arguments are positional parameters to a command. They generally provide fewer features than options but can have infinite ``nargs`` and are required by default. All parameters are passed onwards to the parameter constructor.
| def __init__ | ( | self, | |
| param_decls, | |||
required = None, |
|||
| ** | attrs | ||
| ) |
| def add_to_parser | ( | self, | |
| parser, | |||
| ctx | |||
| ) |
Reimplemented from Parameter.
| def get_error_hint | ( | self, | |
| ctx | |||
| ) |
Get a stringified version of the param for use in error messages to indicate which param caused the error.
Reimplemented from Parameter.
| def get_usage_pieces | ( | self, | |
| ctx | |||
| ) |
Reimplemented from Parameter.
| def human_readable_name | ( | self | ) |
Returns the human readable name of this parameter. This is the same as the name for options, but the metavar for arguments.
Reimplemented from Parameter.
| def make_metavar | ( | self | ) |
Reimplemented from Parameter.
|
static |