Skip to content

Commit f879f92

Browse files
committed
fix(mypy): Add type annotation to fix no-any-return error
The sphinx_argparse_neo module is in mypy's ignore_missing_imports, causing strip_ansi's return type to be treated as Any. Adding explicit str annotation ensures mypy knows the variable type throughout the function.
1 parent 5a79fc6 commit f879f92

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/_ext/sphinx_argparse_neo/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ def _generate_usage(parser: argparse.ArgumentParser) -> str:
570570
formatter.add_usage(
571571
parser.usage, parser._actions, parser._mutually_exclusive_groups
572572
)
573-
usage = formatter.format_help().strip()
573+
usage: str = formatter.format_help().strip()
574574

575575
# Strip ANSI codes before checking prefix (handles FORCE_COLOR edge case)
576576
usage = strip_ansi(usage)

0 commit comments

Comments
 (0)