module documentation

Undocumented

Constant VALIDATORS Undocumented
Function _call_validator Undocumented
Function _choice_validator Undocumented
Function _csv_validator Undocumented
Function _multiple_choice_validator Undocumented
Function _multiple_choices_validating_option Undocumented
Function _non_empty_string_validator Undocumented
Function _py_version_validator Undocumented
Function _regexp_csv_validator Undocumented
Function _regexp_paths_csv_validator Undocumented
Function _regexp_validator Undocumented
Function _validate Return a validated value for an option according to its type.
Function _yn_validator Undocumented

Undocumented

Value
{'string': utils._unquote,
 'int': int,
 'float': float,
 'glob_paths_csv': _csv_validator,
 'regexp': (lambda pattern: re.compile(pattern or '')),
 'regexp_csv': _regexp_csv_validator,
 'regexp_paths_csv': _regexp_paths_csv_validator,
...
def _call_validator(opttype: str, optdict: Any, option: str, value: Any) -> Any: (source)

Undocumented

def _choice_validator(choices: list[Any], name: str, value: Any) -> Any: (source)

Undocumented

def _csv_validator(_: Any, name: str, value: (str|list[str])|tuple[str]) -> Sequence[str]: (source)

Undocumented

def _multiple_choice_validator(choices: list[Any], name: str, value: Any) -> Any: (source)

Undocumented

def _multiple_choices_validating_option(opt: optparse.Option, name: str, value: Any) -> Any: (source)

Undocumented

def _non_empty_string_validator(opt: Any, _: str, value: str) -> str: (source)

Undocumented

def _py_version_validator(_: Any, name: str, value: Any) -> tuple[int, int, int]: (source)

Undocumented

def _regexp_csv_validator(_: Any, name: str, value: str|list[str]) -> list[re.Pattern[str]]: (source)

Undocumented

def _regexp_paths_csv_validator(_: Any, name: str, value: str|list[Pattern[str]]) -> list[Pattern[str]]: (source)

Undocumented

def _regexp_validator(_: Any, name: str, value: str|re.Pattern[str]) -> re.Pattern[str]: (source)

Undocumented

def _validate(value: Any, optdict: Any, name: str = '') -> Any: (source)

Return a validated value for an option according to its type. optional argument name is only used for error message formatting

def _yn_validator(opt: str, _: str, value: Any) -> bool: (source)

Undocumented