Skip to content

Add type hints to cli.__init__.py#193

Closed
hnet158158 wants to merge 2 commits into
pyfenn:mainfrom
hnet158158:gfi/190-add-typing-init
Closed

Add type hints to cli.__init__.py#193
hnet158158 wants to merge 2 commits into
pyfenn:mainfrom
hnet158158:gfi/190-add-typing-init

Conversation

@hnet158158

@hnet158158 hnet158158 commented Jun 29, 2026

Copy link
Copy Markdown

What this PR does / why we need it:
Adds type hints (annotations) for all variables and the main() function signature in cli.__init__.py, improving code clarity and enabling stricter mypy checks.

Changes:

  • Added from __future__ import annotations for forward-compatibility
  • Annotated parser, subparsers, all subcommand parsers (p_pull, p_list, p_dash, p_run, p_auth, p_grid, auth_subparsers, p_login, p_status, p_logout) with argparse.ArgumentParser
  • Annotated args with argparse.Namespace in main()
  • Added return type -> None and parameter type argv: list[str] | None = None to main()

Closes #190

Signed-off-by: hnet158158 <hnet158158@gmail.com>
@ApusBerliozi

Copy link
Copy Markdown
Contributor

Thx for your work! Please, resolve merge conflict, and I will merge this PR

@hnet158158

Copy link
Copy Markdown
Author

Merge conflict resolved. The AUTH section was dropped (since it was removed upstream) while keeping RUN + type hints and the new GRID section from upstream.

@ApusBerliozi

ApusBerliozi commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

@hnet158158, thx!

We don't need run, please remove it as well. Also, kindly check why tests are failing

@hnet158158 hnet158158 closed this by deleting the head repository Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code quality good first issue Good for newcomers help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add typing for cli.__init__.py

2 participants