-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Type[C] #1569
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
Type[C] #1569
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
b7ddf36
Tentative tests for Type[C].
eb61f1d
Pave the way for implementing Type[C].
7b52ac6
WIP: Introducing TypeType: Type[x] becomes TypeType(x).
1fd14f0
WIP: Fix/new tests; implement more subtype checks.
371e425
WIP: Towards supporting Type[T].
96696ff
Fix things so all tests pass!
aa37595
Some cleanup and fixup (not done).
d4745b0
Improve equivalence between type and Type.
cf4a0b7
Add support for method lookup from Type[].
81ee239
Print a proper error for unsupported Type[] args.
3d92049
Reject Type[U] where U's bound is a generic class.
5ab11d2
Support classes with @overload-ed __init__.
afb0482
Update our copies of typing.py to the latest from the python/typing r…
db30d59
Make Type[A] erase to Type[A], but Type[T] erases to Type[Any].
6029c9d
Special-case joining Type[] with builtins.type.
786ef96
Special-case joining Type[] with builtins.type.
ef247f2
Delete outdated XXX comment.
4162103
Finishing touch -- fix and test TypeAnalyser.visit_type_type().
26ff267
Added tests as requested.
256b31a
Remove comment asking for name for analyze_type_type_callee().
d224aff
Use self.default(self.s) instead of AnyType()/NonType() in join/meet.
d9c74a0
Add tests for overloaded __init__.
eaa9e0d
Add more tests. Fixed a bug in join() this found.
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
Prev
Previous commit
Add more tests. Fixed a bug in join() this found.
- Loading branch information
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
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.
Should we verify that the signature of
__init__
of the left type is compatible with the callable on the right?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.
Ah, we aren't checking the signature anywhere so it would be consistent to not have to check it here either. Maybe add a comment about the unsoundness, though.