We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92b1f56 commit 588545fCopy full SHA for 588545f
docs/source/type_narrowing.rst
@@ -100,7 +100,7 @@ for better type inference when working with types and metaclasses:
100
t = type(o) # We must use a variable here
101
reveal_type(t) # Revealed type is "builtins.type"
102
103
- if issubtype(t, MyCalcMeta): # `issubtype(type(o), MyCalcMeta)` won't work
+ if issubclass(t, MyCalcMeta): # `issubclass(type(o), MyCalcMeta)` won't work
104
reveal_type(t) # Revealed type is "Type[MyCalcMeta]"
105
t.calc() # Okay
106
0 commit comments