You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The type checker should know about isinstance checks. For example, this code should be valid:
def f(x: object) -> None:
if isinstance(x, str):
# x has type str here.
print(x + 'foo') # ok
Initially only support cases where the first argument is a variable and the 'if' condition only contains an isinstance check. Later, consider extending this to more complex cases.
The text was updated successfully, but these errors were encountered:
The type checker should know about
isinstance
checks. For example, this code should be valid:Initially only support cases where the first argument is a variable and the 'if' condition only contains an
isinstance
check. Later, consider extending this to more complex cases.The text was updated successfully, but these errors were encountered: