Код: Выделить всё
x = (0, 0)
def is_good() -> bool:
return False
if x and is_good: # I'd like Mypy to report 2 errors here
print('this will be printed')
Подробнее здесь: https://stackoverflow.com/questions/682 ... icit-casts
Код: Выделить всё
x = (0, 0)
def is_good() -> bool:
return False
if x and is_good: # I'd like Mypy to report 2 errors here
print('this will be printed')