Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,5 @@ report.fail_under = 76
html.show_contexts = true
html.skip_covered = false

[tool.mypy]
python_version = "3.12"
show_error_codes = true
strict = true
[tool.ty]
environment.python-version = "3.14"
5 changes: 2 additions & 3 deletions src/sphinx_argparse_cli/_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def parser(self) -> ArgumentParser:
except HookError as hooked:
self._parser = hooked.parser
finally:
ArgumentParser.parse_known_args = original_parse_known_args # type: ignore[method-assign]
ArgumentParser.parse_known_args = original_parse_known_args
else:
self._parser = parser_creator()

Expand Down Expand Up @@ -158,8 +158,7 @@ def _load_sub_parsers(

# If this parser has a subparser, recurse into it
if parser._subparsers: # noqa: SLF001
sub_sub_parser: _SubParsersAction[ArgumentParser]
sub_sub_parser = parser._subparsers._group_actions[0] # type: ignore[assignment] # noqa: SLF001
sub_sub_parser: _SubParsersAction[ArgumentParser] = parser._subparsers._group_actions[0] # type: ignore[assignment] # noqa: SLF001
yield from self._load_sub_parsers(sub_sub_parser)

def load_sub_parsers(self) -> Iterator[tuple[list[str], str, ArgumentParser]]:
Expand Down
4 changes: 2 additions & 2 deletions tox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ commands = [

[env.type]
description = "run type check on code base"
deps = [ "mypy==1.19", "types-docutils>=0.22.3.20251115" ]
commands = [ [ "mypy", "src", "tests", { replace = "posargs", extend = true } ] ]
deps = [ "ty>=0.0.17" ]
commands = [ [ "ty", "check", "--output-format", "concise", "--error-on-warning", "." ] ]

[env.dev]
description = "generate a DEV environment"
Expand Down