MCPcopy
hub / github.com/certbot/certbot / CaseInsensitiveList

Class CaseInsensitiveList

certbot/src/certbot/_internal/cli/cli_utils.py:154–163  ·  view source on GitHub ↗

A list that will ignore case when searching. This class is passed to the `choices` argument of `argparse.add_arguments` through the `helpful` wrapper. It is necessary due to special handling of command line arguments by `set_by_cli` in which the `type_func` is not applied.

Source from the content-addressed store, hash-verified

152 args_or_config.ip_addresses.append(ip_address)
153
154class CaseInsensitiveList(list):
155 """A list that will ignore case when searching.
156
157 This class is passed to the `choices` argument of `argparse.add_arguments`
158 through the `helpful` wrapper. It is necessary due to special handling of
159 command line arguments by `set_by_cli` in which the `type_func` is not applied."""
160 def __contains__(self, element: object) -> bool:
161 if not isinstance(element, str):
162 return False
163 return super().__contains__(element.lower())
164
165
166def _user_agent_comment_type(value: str) -> str:

Callers 1

_create_subparsersFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected