File tree Expand file tree Collapse file tree 1 file changed +0
-37
lines changed Expand file tree Collapse file tree 1 file changed +0
-37
lines changed Original file line number Diff line number Diff line change 1717 CONTRAVARIANT ,
1818 COVARIANT ,
1919 ArgKind ,
20- Block ,
21- ClassDef ,
22- SymbolTable ,
2320 TypeInfo ,
2421)
2522from mypy .types import (
@@ -1348,40 +1345,6 @@ def visit_type_type(self, template: TypeType) -> list[Constraint]:
13481345 else :
13491346 return []
13501347
1351- def _make_type_info (
1352- self ,
1353- name : str ,
1354- module_name : str | None = None ,
1355- mro : list [TypeInfo ] | None = None ,
1356- bases : list [Instance ] | None = None ,
1357- ) -> TypeInfo :
1358- """Make a TypeInfo suitable for use in unit tests."""
1359-
1360- class_def = ClassDef (name , Block ([]), None , [])
1361- class_def .fullname = name
1362-
1363- if module_name is None :
1364- if "." in name :
1365- module_name = name .rsplit ("." , 1 )[0 ]
1366- else :
1367- module_name = "__main__"
1368-
1369- info = TypeInfo (SymbolTable (), class_def , module_name )
1370- if mro is None :
1371- mro = []
1372- if name != "builtins.object" :
1373- mro .append (self .oi )
1374- info .mro = [info ] + mro
1375- if bases is None :
1376- if mro :
1377- # By default, assume that there is a single non-generic base.
1378- bases = [Instance (mro [0 ], [])]
1379- else :
1380- bases = []
1381- info .bases = bases
1382-
1383- return info
1384-
13851348
13861349def neg_op (op : int ) -> int :
13871350 """Map SubtypeOf to SupertypeOf and vice versa."""
You can’t perform that action at this time.
0 commit comments