-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use get_protocol_members in protocol checking
This changes `check_protocol()` to make use of `get_protocol_members` from typing-extensions. This allows removing an existing hard-coded exclusion list for attributes existing on Protocol, but also handles the cases `__orig_bases__` and `__weakref__` that was breaking when checking intersecting protocols (a subclass of two or more protocols). This has the effect of turning some false positives into true negatives, but it also leaves some false negatives. To make that clear, xfail test cases are added for the resulting false negatives.
- Loading branch information
1 parent
c72b675
commit b8172ba
Showing
3 changed files
with
76 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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 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 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