Repository navigation
Better error message for assignments and returns incompatible due to invariance - #6803
Merged
ilevkivskyi merged 18 commits intoMay 9, 2019
Conversation
…ers struggles. After clone the project I was not able to find the folder for typeshed because I was looking for it at the mypy repo folder but actually there is a second folder also called mypy where the typeshed folder will be, the right path is 'mypy/mypy/typeshed'.
ilevkivskyi
reviewed
May 8, 2019
ilevkivskyi
left a comment
Member
There was a problem hiding this comment.
Thank you for the PR! The general idea looks right, here I have few comments.
felipythondev
force-pushed
the
better-error-message-for-assignments-incompatible-due-to-invariance
branch
from
May 8, 2019 20:11
fb4edbd to
95a86e0
Compare
ilevkivskyi
reviewed
May 8, 2019
ilevkivskyi
reviewed
May 8, 2019
Member
|
Also please don't force push, it makes reviewing harder, just add more commits to the branch. |
added 12 commits
May 8, 2019 18:31
ilevkivskyi
approved these changes
May 9, 2019
ilevkivskyi
left a comment
Member
There was a problem hiding this comment.
Great, thanks for updates! I think this is now ready to be merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The tests are failing probably because I'm checking the
INCOMPATIBLE_TYPES_IN_ASSIGNMENTnot at the right part of this method.I also not sure if the type expected by
append_invariance_notesthat I am passing to it, thesubtypeand thesupertypebecause the test that I created work but it do not work for several other tests.Most of the error are something like:
AttributeError: 'TypeType' object has no attribute 'type'Can someone help me with it?
Here are two examples:
Fixes: #4186