Skip to content

Conversation

@GhostOps77
Copy link
Contributor

@GhostOps77 GhostOps77 commented Jun 23, 2024

This PR adds typehints to the existing code, and added mypy test env in tox to perform type checking in GHA

Also, changed click_repl.utils._help_internal function to just print the help text, rather than returning it, so that all function callbacks for internal command can be in the same type of Callable[[], None]

…ernal_commands' checks whether its an internal command or not, to make every callback function for every internal command takes no arguments and return None
…tisfy mypy

Using isinstance check with (Sequence, Generator, Iterator) rather than with (Mapping, Iterable) for aliases of an internal command: click_repl/utils.py
Updated testing dependencies to include flake8 and mypy: setup.cfg
@auvipy auvipy self-requested a review August 12, 2024 15:11
Copy link
Collaborator

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you do another round to see if all the types are updated here?


val = formatter.getvalue() # type: str
return val
print(formatter.getvalue())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should get rid of the print() and return it like before. what is your thoughts on this?

@auvipy auvipy merged commit f4d39de into click-contrib:master May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants