-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Support for functions producing generic functions #3113
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 28 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
679a172
Make it an error to use a class-attribute type var outside a type
sixolet 74e9262
Fix the error message to handle more cases
sixolet 5470c77
oops accidentally changed a file
sixolet 12def8b
Typo fix
sixolet 52782fe
more checking things in tests
sixolet 0184595
Change error message
sixolet 757a6b8
Change error message
sixolet 57bca93
Make TypeQuery more general, handling nonboolean queries.
sixolet 3b8bc23
Remove redundant empty check
sixolet 82da335
Some types in the visitor were missing recursion
sixolet 9f12644
Add ellipsis type handler to TypeQuery
sixolet 8cf4fa6
Typechecks, but gives spurious error. Need to move variable binding?
sixolet 2634277
Small change: Move tvar id generation nearer type analysis
sixolet 30dba10
Even nearer
sixolet 7b4f9f2
Replace the concept of BOUND_TVAR and UNBOUND_TVAR as mutative flags …
sixolet daf9592
Mid debugging gotta push now
sixolet 826b9cf
Checkpoint. Most tests pass, classvar type aliases not yet
sixolet 4141f94
forgot this file
sixolet 58e3a2a
Fix aliasing to not bind type vars within a callable while aliasing
sixolet c061a09
removed some now-unused code
sixolet 603013d
my own code review, first pass
sixolet c6fec63
Use type var query instead of another query fn
sixolet f46d52a
Tighten code
sixolet ea21337
fix some types
sixolet 80d62a7
Use same type alias throughout
sixolet eaf8c0d
Make semanal tests pass. Delete one I think is wrong
sixolet 5009a2b
Generator types for generators
sixolet 7c64464
Lint and cleanups
sixolet a866d0f
Test for using generic function return as a decorator
sixolet 9d5c630
Merge upstream
sixolet 4683d70
Merge lint
sixolet cbb3cb0
Merged master; adapted code to use better TypeQuery
sixolet da0d936
More tests for nested and multi-type-var situations
sixolet edbecb0
Fixed type variable scoping rules to conform to PEP484 better
sixolet 21d8b13
Move the typevars that are prohibited due to being bound by the class…
sixolet 214aebc
More doc
sixolet 5405646
Jukka comments
sixolet a25e926
one more
sixolet 4aaab6c
get imports right
sixolet fd153ad
Merge branch 'master' into second-order-decorator
sixolet 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
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
Oops, something went wrong.
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.
This is the part that depends on #3105 -- the
TypeVarExpr
is now only associated with itsTypeVarDef
by scope, not direct reference.