-
Notifications
You must be signed in to change notification settings - Fork 277
Labels
Description
Describe the Bug
from typing import *
def foo(expected: Union[bool, int, float, complex]):
return abs(expected) # this is an error
foo(False) # outputs 0 in abs
abs(False) # is fine - only when bool is part of a union
Sandbox Link
(Only applicable for extension issues) IDE Information
No response
Reactions are currently unavailable