-
- Notifications
You must be signed in to change notification settings - Fork 3.1k
Protocols #3132
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
Protocols #3132
Changes from all commits
Commits
Show all changes
152 commits Select commit Hold shift + click to select a range
884481d Recognize protocols in semanal.py
c19b6d4 Add issubtype and basic constraints
ilevkivskyi 83c1579 Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi b01f5b0 Remove debugging code
ilevkivskyi 16901fc Minor fixes: semanal, constrains, lib-stub; add few tests
c8c1247 Allow mypy_extensions.runtime, revert change to test name.
f430c65 Fix typo
beea7d2 Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi 260237a Enhance constraints, add join (meet seems to be already OK); minor fixes
ilevkivskyi 5414eaf Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi 7f8a514 Prohibit protocol instatiation except Type[]; start working on @runtime
ilevkivskyi 92b71a2 Add some tests
ilevkivskyi 83085c7 Restore docstring formstting
ilevkivskyi 27b8570 Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi 41179c2 Fix serialization; add few more tests
ilevkivskyi 5171844 Add notes for missing protocol members in assignment
ilevkivskyi db123a3 Add notes for missing members also for arguments and return types
ilevkivskyi 31bf16c Prohibit definition via self.x in protocol classes
ilevkivskyi 03b5d72 Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi 65a8546 Make more things in fixtures structural subtypes
ilevkivskyi 2768d76 Structural support for __call__; add more tests
ilevkivskyi 93beb75 Fix lint and tests
ilevkivskyi 5135fd9 Beautify error notes
ilevkivskyi fdeb89b Bind self to potential subtype; add tests for structural self-types
ilevkivskyi 1fbcb4a One more test
ilevkivskyi d012e38 Move global data to nodes.TypeInfo
ilevkivskyi 801770d Add comments and docstrings; recognize and treat abstract variables
ilevkivskyi a625f37 Fix tests and lint
ilevkivskyi fb6b1ad Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi adb68eb Add two more tests for recursive
ilevkivskyi b9a0b2d Add test for Sized
ilevkivskyi 969f76f Fix crash in typeanal.py; ignore positional arg names for subtyping; …
ilevkivskyi 2e5de3e Change order of structural and nominal checks to boost speed; minor f…
ilevkivskyi 1daaf8d Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi 2b6d198 Add structural support for tuples and named tuples; add tests
ilevkivskyi 937c629 Add support for staticmethod, classmethod, property, ClassVar + tests…
ilevkivskyi e8e6661 Speed improvements; more carefull treatment of strucutral inference
ilevkivskyi 8e6306f Minor fixes and one more test
ilevkivskyi 3f2d707 Start adding some docs
ilevkivskyi a82413d Merge remote-tracking branch 'upstream/master' into protocols
957c76d Add one more test
8cf08ec Try to sync typeshed
ilevkivskyi e0083d9 Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi c9629da Simplify one test
ilevkivskyi affec0c Add more docs
ilevkivskyi 01948dd Allow incompatible __init__ in structural subtypes
ilevkivskyi 78a62eb Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi 0ae409a Fix minor failure after merge
ilevkivskyi cb27279 Re-run Travis
ilevkivskyi 5452227 Merge branch 'master' into protocols
ilevkivskyi 798954a Implement subtype cache
ilevkivskyi 9db4e51 Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi 7d2327a Restore correct typeshed commit
ilevkivskyi 88d4fed Typeshed again
ilevkivskyi d9187e2 Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi 3ee1c53 Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi 85082d5 Switch to NotImplemented instead of False in __eq__
ilevkivskyi 2733e1a Prohibit using NewType with protocols
ilevkivskyi 232428f Address CR
ilevkivskyi 4c04e0b Restore current typeshed commit
ilevkivskyi e81a3f9 Add some support for __dunder__ = None idiom
ilevkivskyi b4ca6f0 Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi b063767 Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi 79d8e30 Trigger AppVeyor re-build
480b977 Disable covariant subtyping for mutable members
ilevkivskyi 483f163 Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi 70c3ae0 Fix remaining test
ilevkivskyi 509113a Add much more detailed error messages
ilevkivskyi 0cb0985 Fix one error message in one more test
ilevkivskyi 9f554b6 Fix minor metaclass self-type bug, add various tests
ilevkivskyi 70463a5 Add two more tests (including for Any compatibility in protocols)
ilevkivskyi 78f2011 Merge branch 'master' into protocols
ilevkivskyi 473a2d2 Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi 8dfe8ea Add two corner case tests: __getattr__; implicit types
ilevkivskyi f7e55fa Merge branch 'master' into protocols
ilevkivskyi 06a1680 Fix fixture after merge
ilevkivskyi 204ec82 Merge branch 'master' into protocols
ilevkivskyi 985d1f7 Add variance checks and modify tests accordingly
ilevkivskyi 8d2e199 Minor update to docs
ilevkivskyi f0471c1 Merge branch 'master' into protocols
ilevkivskyi 4dfa3e1 Fix trailing whitespace
ilevkivskyi 6d05060 Detailed error messages also for structural subtyping of tuples and c…
ilevkivskyi 759409f Add more protocol variance checks
ilevkivskyi 83501ff Merge branch 'master' into protocols
ilevkivskyi 166b6da Fix careless merge (#N: formatting)
ilevkivskyi d25bcfc Merge branch 'master' into protocols
ilevkivskyi d652a69 Fix merge
ilevkivskyi addac40 Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi 803ce1e Fix merge
ilevkivskyi 1c9f6f9 Merge branch 'master' into protocols
ilevkivskyi 3c0411c Improve notes formatting: add offsets
ilevkivskyi 491b31f Add more incremental tests
ilevkivskyi 98f0180 Add support for __setattr__ (and few docstrings)
ilevkivskyi 0f55718 Simplify hashes
ilevkivskyi 513c759 Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi 36f3d6d Restore typeshed commit
ilevkivskyi 05b70ab Add explanation of covariant mutable overriding to common issues docs
ilevkivskyi 561856e Merge branch 'master' into protocols
ilevkivskyi 228f621 Fix brocken merge (now Mapping needs to be Iterable in typing-full fi…
ilevkivskyi 0716b59 Merge branch 'master' into protocols
ilevkivskyi 9cd4e29 Merge branch 'master' into protocols
ilevkivskyi eb06c55 Fix strict-optional
ilevkivskyi 59aeed2 Fix other merge problems
ilevkivskyi 73d2d69 Merge branch 'master' into protocols
ilevkivskyi ee18dde Fix fixtures/dict.pyi fixture
ilevkivskyi 34d1cd1 Fix TypedDict joins with protocols via fallback
ilevkivskyi fbbd169 Use typing_extensions instead of typing in the docs
3acd19e Use pre-PEP-526 syntax in docs where possible
22ad771 Move generic protocols after nominal generics docs
4f2391e Change recommendations about using protocols
359a43b Restore correct typeshed commit
eacff5f Switch from mypy_extensions to typing_extensions in semanal and in tests
ilevkivskyi afe1291 Fix lint
ilevkivskyi 1858ed9 Move most protocol erro formatting to messages.py
ilevkivskyi 057a871 Fix few error messages in tests
ilevkivskyi 28c1b9d Limit display of missing protocol members
ilevkivskyi ad2bcaa Limit (and simplify) display of conflicting protocol member types
ilevkivskyi 8af7248 Use pretty callable formatting. Credits to @markkohdev
ilevkivskyi 9ca98b2 Truncate output (max 2 conflicts, max 2 overloads), better formatting…
ilevkivskyi 0cb13b7 Fix lint
ilevkivskyi fd06408 Factor out some common code
ilevkivskyi 969a64b Remove some redundant code
ilevkivskyi e9cbba8 Merge branch 'master' into protocols
ilevkivskyi e93f839 Fix broken merge
9292971 First part of CR
4c3f4e2 Second part of CR (few more comments left)
e71dff0 Fix strict-optional check
ilevkivskyi d195964 Don't hash most types (including syntetic)
ilevkivskyi 318bb70 Correct comment in test
ilevkivskyi 3d8782f Improve structural support for TypedDict and minor things
ilevkivskyi 6e1100c Don't show detailed erorrs for TypedDicts in simple cases
ilevkivskyi 5bfa3b2 Add also an exception for NamedTuples
ilevkivskyi 82f01b7 Add one more test
ilevkivskyi c7304bd Dict is not a protocol
ilevkivskyi 58e6b36 Two minor tweaks: more precise isinstance, require explicit types for…
ilevkivskyi eefe881 Restore typeshed commit
ilevkivskyi 96a04ae pythoneval tests should wait until typeshed PR is merged
ilevkivskyi b1c4d37 Merge branch 'master' into protocols
ilevkivskyi 8b6006c Fix a silly mistake in merge
ilevkivskyi f76349b Replace one last mention of typing with typing_extensions
ilevkivskyi c3bfe2b Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi e2f4f5d Merge remote-tracking branch 'upstream/master' into protocols
ilevkivskyi 91fe9fd Add TypeOfAny
ilevkivskyi aaea344 Remove some ocassionally added files
ilevkivskyi 27c3e36 Limit unnecessary conflicts display and fix conflict count (with test)
ilevkivskyi cfa539d Remove some strange file
ilevkivskyi 713db0c Implememt first part of recent comments
ilevkivskyi 40d635f Address second part of recent comments
ilevkivskyi 19073e5 First part of todays comments
ilevkivskyi 50d98c0 Second part of yesterdays comments
ilevkivskyi 9411255 Last part of review comments
ilevkivskyi f1c915e One last missing comment
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
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.
Mention that structural subtyping is still experimental.