-
Notifications
You must be signed in to change notification settings - Fork 14
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
Make mypy_plugin compatible with mypy>=0.730 #28
Conversation
* Removed SimpleBuffer since it seems unnecessary atm * This avoids type errors down the line
22e523c
to
a52fede
Compare
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.
Thanks, this looks good! Just the one minor comment, really.
I've added you as a collaborator on the repository, since you've been doing so much great work. Feel free to merge at will. 😄
requirements.txt
Outdated
@@ -1,5 +1,5 @@ | |||
yapf==0.27.0 | |||
mypy==0.711 | |||
mypy>=0.711 |
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'd prefer for requirements.txt
to actually be a snapshot of known-working dependencies, so anyone can pip install -r requirements.txt
and know that their setup should work. This range leaves open the possibility that it may break again the future.
How about something like, e.g.:
mypy>=0.711 | |
mypy>=0.711, <=0.761 |
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.
Alright, done :)
* This fixes issue 21 * New type_analyze_hook to fix types before mypy's semantic analyzer runs * _get_and_delete_cases defers if it encounters PlaceholderNodes
This introduces a new hook to change the type
mypy
sees before the semantic analyzer runs. This is briefly discussed in #21The other issues raised in my comment turned out to be bugs that already existed for the old mypy version, too. These are not addressed with this fix.
This has been tested with
mypy==0.711
andmypy=0.761