class documentation

class BadParameter(UsageError):

Known subclasses: click.exceptions.MissingParameter

View In Hierarchy

An exception that formats out a standardized error message for a bad parameter. This is useful when thrown from a callback or type as Click will attach contextual information to it (for instance, which parameter it is).

New in version 2.0.
Parameters
paramthe parameter object that caused this error. This can be left out, and Click will attach this info itself if possible.
param​_hinta string that shows up as parameter name. This can be used as alternative to param in cases where custom validation should happen. If it is a string it's used as such, if it's a list then each item is quoted and separated.
Method __init__ Undocumented
Method format​_message Undocumented
Instance Variable param Undocumented
Instance Variable param​_hint Undocumented

Inherited from UsageError:

Method show Undocumented
Class Variable exit​_code Undocumented
Instance Variable cmd Undocumented
Instance Variable ctx Undocumented

Inherited from ClickException (via UsageError):

Method __str__ Undocumented
Instance Variable message Undocumented
def __init__(self, message, ctx=None, param=None, param_hint=None):

Undocumented

Parameters
message:strUndocumented
ctx:t.Optional[Context]Undocumented
param:t.Optional[Parameter]Undocumented
param​_hint:t.Optional[str]Undocumented
def format_message(self):

Undocumented

Returns
strUndocumented
param =

Undocumented

param_hint =

Undocumented