-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-44975: [typing] Support issubclass for ClassVar data members #27883
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
Changes from 1 commit
a613af6
f045d2e
58c69e1
2ed2ee5
c842370
f44d3b6
9278a34
ba57bb1
43ec2ea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1622,7 +1622,7 @@ class D: | |
self.assertNotIsSubclass(C, P) | ||
self.assertIsSubclass(D, P) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's also test these classes: class G:
x: ClassVar[int] = 1 class H:
x: 'ClassVar[int]' = 1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These aren't testing more code paths, the code doesn't look at the annotations of the first class argument in |
||
# String / PEP 563 annotations. | ||
# String annotations (forward references). | ||
@runtime_checkable | ||
class P(Protocol): | ||
x: "ClassVar[int]" = 1 | ||
|
Uh oh!
There was an error while loading. Please reload this page.