|
39 | 39 | if importlib.metadata.version("click") < "8.2": |
40 | 40 | from click.parser import split_opt |
41 | 41 |
|
42 | | - class EnumChoice(Choice): |
| 42 | + class EnumChoice(Choice): # type: ignore[type-arg, unused-ignore] |
43 | 43 | """An enum-based choice type. |
44 | 44 |
|
45 | 45 | The implementation is copied from https://github.com/pallets/click/pull/2210 and |
@@ -71,17 +71,17 @@ def convert( |
71 | 71 | return self.enum_type(value) |
72 | 72 |
|
73 | 73 | else: |
74 | | - from click.parser import ( # type: ignore[attr-defined, no-redef] |
| 74 | + from click.parser import ( # type: ignore[attr-defined, no-redef, unused-ignore] |
75 | 75 | _split_opt as split_opt, |
76 | 76 | ) |
77 | 77 |
|
78 | 78 | ParamTypeValue = TypeVar("ParamTypeValue") |
79 | 79 |
|
80 | | - class EnumChoice(Choice): # type: ignore[no-redef] |
| 80 | + class EnumChoice(Choice): # type: ignore[no-redef, type-arg, unused-ignore] |
81 | 81 | def __init__( |
82 | 82 | self, choices: Iterable[ParamTypeValue], case_sensitive: bool = False |
83 | 83 | ) -> None: |
84 | | - super().__init__(choices=choices, case_sensitive=case_sensitive) # type: ignore[arg-type] |
| 84 | + super().__init__(choices=choices, case_sensitive=case_sensitive) # type: ignore[arg-type, unused-ignore] |
85 | 85 |
|
86 | 86 |
|
87 | 87 | class _OptionHighlighter(RegexHighlighter): |
@@ -340,7 +340,7 @@ def _format_help_text( # noqa: C901, PLR0912, PLR0915 |
340 | 340 | elif param.is_bool_flag and param.secondary_opts: # type: ignore[attr-defined] |
341 | 341 | # For boolean flags that have distinct True/False opts, |
342 | 342 | # use the opt without prefix instead of the value. |
343 | | - default_string = split_opt( |
| 343 | + default_string = split_opt( # type: ignore[operator, unused-ignore] |
344 | 344 | (param.opts if param.default else param.secondary_opts)[0] |
345 | 345 | )[1] |
346 | 346 | elif ( |
|
0 commit comments