-
Notifications
You must be signed in to change notification settings - Fork 940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix more typing issues #1351
Fix more typing issues #1351
Conversation
I look forward to having mypy activity….at the very least for the api. Thanks a lot for taking this on. I prefer to allow “implicit option types” that is writing “text: str = None” is allowed. Forcing “text: Optional[str, None] = None” is just a real PITA. I am happy to review your stuff whenever you feel you have reached a level, where you want it merged. Just put it in review, and I will review/approve fast. |
@janiversen fwiw, even though https://peps.python.org/pep-0484/#union-types
|
I know that it is recommended, but it not demanded. We support 3.8+ so for us it would be a lot of useless typing, which do not make the code better or more readable. Please remark this is just my opinion and in no way a demand. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should merge this soon to avoid having clashes with other pull requests. Making a merge after every 10-20 files sounds good to me.
It is a big job you have taken on, but it looks very very nice.
OK, it should be ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A very good start. I did not know that typer() converted, thanks for testing it.
I merged the first part….looks very good to me. Looking forward to see next part. |
Type hints (mypy) part 1.
I'm trying out
mypy
. This is still a WIP, although you can merge early if you want.What should we do with implicit optional types? https://adamj.eu/tech/2022/10/18/python-type-hints-implicit-optional-types/