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
Use --no-implicit-optional for type checking #4378
Conversation
This makes type checking PEP 484 compliant (as of 2018). mypy will change its defaults soon. See: python/mypy#9091 python/mypy#13401
please review :-) |
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.
Otherwise looks good, thank you.
Please update.
changes/4378-hauntsaninja.md
Outdated
@@ -0,0 +1 @@ | |||
Use ``--no-implicit-optional`` for type checking. |
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.
This is markdown, not rst.
I fixed the markdown, but it looks like tests on Python 3.8 are failing with a weird Literal[None] issue. I see the code to work around this — was that issue flaky or has something about my change reactivated it? |
That's very weird, but I haven't seen that test being flakey before. I think it much be caused by your change, or be new. |
I don't see it on other newer builds, so it must be caused by your changes. |
I'll take a detailed look at it, but if I can't figure it out, how would you feel about potentially using the 3.7 code for 3.8 as well? If it can be activated by this seemingly no-op change, there may be a real issue here. |
It looks like we have a custom implementation for a reason, but if it's really not necessary, we could remove it. |
Let's wait and adopt this in the V2 codebase. |
Great to see this happening! 👍🏻 Don't forget to add |
We've had a |
@samuelcolvin ah missed that one. I expected it to be on the root level. 👍🏻 |
The code base will change too much for V2 to keep this pr, but I'm tracking the issue in #4424 |
Change Summary
This makes type checking PEP 484 compliant (as of 2018).
mypy will change its defaults soon.
See:
python/mypy#9091
python/mypy#13401
Checklist
changes/<pull request or issue id>-<github username>.md
file added describing change(see changes/README.md for details)