Skip to content

Commit 2be4069

Browse files
JukkaLtushar-deepsource
authored andcommitted
Minor optimization/cleanup (python#11544)
if TYPE_CHECKING is compiled inefficiently right now (mypyc/mypyc#902).
1 parent 716c4cd commit 2be4069

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mypy/types.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -956,9 +956,7 @@ class FunctionLike(ProperType):
956956
def __init__(self, line: int = -1, column: int = -1) -> None:
957957
super().__init__(line, column)
958958
self.can_be_false = False
959-
if TYPE_CHECKING: # we don't want a runtime None value
960-
# Corresponding instance type (e.g. builtins.type)
961-
self.fallback = cast(Instance, None)
959+
self.fallback: Instance
962960

963961
@abstractmethod
964962
def is_type_obj(self) -> bool: pass

0 commit comments

Comments
 (0)