Skip to content

Commit 164cf7c

Browse files
authored
Micro-optimize Instance.__init__ (#6012)
Remove a somewhat expensive assert that doesn't seem very useful. This probably doesn't result in measurable savings, though.
1 parent 2b1bb6e commit 164cf7c

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

mypy/types.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,6 @@ class Instance(Type):
551551
def __init__(self, typ: mypy.nodes.TypeInfo, args: List[Type],
552552
line: int = -1, column: int = -1, erased: bool = False) -> None:
553553
super().__init__(line, column)
554-
assert not typ or typ.fullname() not in ["builtins.Any", "typing.Any"]
555554
self.type = typ
556555
self.args = args
557556
self.erased = erased # True if result of type variable substitution

0 commit comments

Comments
 (0)