-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Create TypeVarInstance type for legacy typevars
#16538
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 50 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
ac1cbe6
Create TypeVarInstance type for legacy typevars
dcreager d095520
TypeVars have ambiguous truthiness as long as they're dynamic
dcreager e41ff39
Fix test failures
dcreager 29852ac
Expose __constraints__
dcreager 090b183
Test empty constraints too
dcreager 363fce6
Expose __bound__
dcreager 157fb7e
Use NoDefault for default default
dcreager 87f56ff
Expose __default__
dcreager 40d392e
Fewer salsa queries
dcreager f8d0350
Treat TypeVar as Any for descriptor protocol
dcreager 6284357
Merge branch 'main' into dcreager/legacy-typevar-instance
dcreager 6338868
Fix most merge conflicts
dcreager 1073f86
Thread containing assignment down through type inference
dcreager c5978a7
Remove some moot TypeVar → Any translations
dcreager 57c1adf
Add back extra TypeVar properties
dcreager fd91822
Merge branch 'main' into dcreager/legacy-typevar-instance
dcreager d735666
Fix merge conflicts
dcreager 92fe5d6
Skip call constructor logic for TypeVar
dcreager dc78234
TODO: detect legacy typevars in function parameter list
dcreager c94cee9
Track whether typevar is legacy or PEP 695
dcreager f7e5a18
Merge branch 'main' into dcreager/legacy-typevar-instance
dcreager f2ed471
Handle generic constructors of generic classes
dcreager 5631243
Merge branch 'dcreager/generic-constructor' into dcreager/legacy-type…
dcreager 8cdde43
Find legacy typevars in function parameter lists
dcreager 269a487
clippy
dcreager 0bcbc1c
remove no longer accurate comment
dcreager 2e87308
remove fwomp
dcreager 70e3a84
Reveal the return type
dcreager 71b1677
Add explanatory comment
dcreager 8f0cabb
Fix custom `reveal_type` signatures
dcreager fbb6369
Revert custom `reveal_type` signatures
dcreager 93feb23
Reveal argument type again
dcreager 6976c81
We don't need this
dcreager d4b8c6f
Merge branch 'main' into dcreager/generic-constructor
dcreager 8a34b11
Merge branch 'dcreager/generic-constructor' into dcreager/legacy-type…
dcreager bcea973
fix snapshot tests
dcreager bfac80b
Pull FunctionLiteral out into separate type
dcreager 0a09a28
Merge branch 'dcreager/generic-constructor' into dcreager/legacy-type…
dcreager 9e72367
clippy
dcreager 345fff3
Clean this up a bit
dcreager 43ce8d5
Revert FunctionLiteral type
dcreager 7cce514
Merge remote-tracking branch 'origin/main' into dcreager/generic-cons…
dcreager 899bc19
Merge branch 'dcreager/generic-constructor' into dcreager/legacy-type…
dcreager c9f2fc2
Merge branch 'main' into dcreager/legacy-typevar-instance
dcreager 7218d0c
Fix tests
dcreager 0f62237
Fix benchmarks
dcreager 945b067
Clarify comment
dcreager 7a1f1b6
Diagnostics for invalid legacy typevars
dcreager 0d09595
Merge branch 'main' into dcreager/legacy-typevar-instance
dcreager 8fd75e3
Update lints
dcreager 2d07b0a
Track containing assignment in semantic index
dcreager a8132a3
Move legacy typevar stuff up to infer.rs
dcreager dae95a7
Revert "Thread containing assignment down through type inference"
dcreager 230c69d
clippy
dcreager fb51439
Merge branch 'main' into dcreager/legacy-typevar-instance
dcreager a507a35
Add false positive test for annotated assignment
dcreager fdaa4c9
Merge branch 'main' into dcreager/legacy-typevar-instance
dcreager 837489d
Update mdtest snapshots
dcreager 8e78adc
Detect inferred args that don't satisfy bound/constraints
dcreager 30f116f
Merge branch 'main' into dcreager/legacy-typevar-instance
dcreager 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
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.
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.
Uh oh!
There was an error while loading. Please reload this page.