Например, я бы хотел, чтобы VS Code предупреждал меня об этом возможном сравнении с None:
Код: Выделить всё
def test( index: Optional[int] ) -> None:
""""Test possible compare to None."""
temp: int = 12
if temp == index:
print( "index is 12" )
Подробнее здесь: https://stackoverflow.com/questions/790 ... sible-none