mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-11 07:55:56 +03:00
Update type-concepts.md (#4029)
A fix to add a missing parameter to isinstance as: - isinstance(val, Bar)
This commit is contained in:
parent
d18a33b065
commit
40d511fadc
@ -196,7 +196,7 @@ class Foo: pass
|
|||||||
class Bar: pass
|
class Bar: pass
|
||||||
|
|
||||||
def func1(val: Union[Foo, Bar]):
|
def func1(val: Union[Foo, Bar]):
|
||||||
if isinstance(Bar):
|
if isinstance(val, Bar):
|
||||||
reveal_type(val) # Bar
|
reveal_type(val) # Bar
|
||||||
else:
|
else:
|
||||||
reveal_type(val) # Foo
|
reveal_type(val) # Foo
|
||||||
|
Loading…
Reference in New Issue
Block a user