-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix crashes and fails in forward references #3952
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
45e5931
Add basic tests, more details will be added when they will not crash
ilevkivskyi cb4caa5
Correct tests
ilevkivskyi 1cdc980
Implement ForwardRef type, wrap UnboundType, pass SecondPass to third…
ilevkivskyi 260ef02
Add ForwardRefRemover
ilevkivskyi a58a217
Add elimination patches
ilevkivskyi 950a022
Fix replacement logic; fix newtype error formatting
ilevkivskyi 411b24d
Fix third pass (need to go deeper)
ilevkivskyi b9b8528
Implement syntethic replacer
ilevkivskyi 48d6de4
Need to go deeper (as usual)
ilevkivskyi ec45441
Fix postponed fallback join
ilevkivskyi ac32ed4
Simplify some code and add annotations
ilevkivskyi 3fb3019
Simplify traversal logic; add loads of tests
ilevkivskyi f9b1320
Take care about one more special case; add few tests and dcostrings
ilevkivskyi cf014b8
Unify visitors
ilevkivskyi 665236b
Add some more comments and docstrings
ilevkivskyi 9a318aa
Add recursive type warnings
ilevkivskyi 757fbd9
Fix lint
ilevkivskyi 4502ce2
Also clean-up bases; add more tests and allow some previously skipped
ilevkivskyi 3b39d40
One more TypedDict test
ilevkivskyi c8b28fe
Add another simple self-referrential NamedTuple test
ilevkivskyi 9f92b0f
Fix type_override; add tests for recursive aliases; fix Callable TODO…
9779103
Merge branch 'master' into fix-synthetic-crashes
ilevkivskyi b914bdb
Merge remote-tracking branch 'upstream/master' into fix-synthetic-cra…
ilevkivskyi 3568fdb
Skip the whole ForwardRef dance in unchecked functions
ilevkivskyi 54d9331
Simplify test
ilevkivskyi b9ddacc
Fix self-check
ilevkivskyi 5bfe9ca
Fix cross-file forward references (+test)
ilevkivskyi a2912e9
More tests
ilevkivskyi 10c65b8
Merge branch 'master' into fix-synthetic-crashes
ilevkivskyi 21dfbfe
Fix situation when recursive namedtuple appears directly in base clas…
ilevkivskyi f2ddbcd
Merge branch 'fix-synthetic-crashes' of https://github.com/ilevkivsky…
ilevkivskyi 03597ee
Clean-up PR: Remove unnecesary imports, outdated comment, unnecessary…
ilevkivskyi 649ef32
Add tests for generic classes, enums, with statements and for statements
ilevkivskyi 83f8907
Add processing for for and with statements (+more tests)
ilevkivskyi 13c7176
Add support for generic types with forward references
ilevkivskyi 79b10d6
Prohibit forward refs to type vars and subscripted forward refs to al…
ilevkivskyi 321a809
Refactor code to avoid passing semantic analyzer to type analyzer, on…
ilevkivskyi 076c909
Address the rest of the review comments
ilevkivskyi c1a63ec
Improve two tests
ilevkivskyi 97e6f47
Add one more test as suggested in #3990
ilevkivskyi 8f52654
Address latest review comments
ilevkivskyi 6edd078
Improve tests; Fix one more crash on NewType MRO
ilevkivskyi 514b8bd
Fix formatting in tests
ilevkivskyi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
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.
Could you combine the two places where we generate
TypeAnalyserPass3
as there seems to be duplication?