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 (
@@ -1336,40 +1333,6 @@ def visit_type_type(self, template: TypeType) -> list[Constraint]:
13361333 else :
13371334 return []
13381335
1339- def _make_type_info (
1340- self ,
1341- name : str ,
1342- module_name : str | None = None ,
1343- mro : list [TypeInfo ] | None = None ,
1344- bases : list [Instance ] | None = None ,
1345- ) -> TypeInfo :
1346- """Make a TypeInfo suitable for use in unit tests."""
1347-
1348- class_def = ClassDef (name , Block ([]), None , [])
1349- class_def .fullname = name
1350-
1351- if module_name is None :
1352- if "." in name :
1353- module_name = name .rsplit ("." , 1 )[0 ]
1354- else :
1355- module_name = "__main__"
1356-
1357- info = TypeInfo (SymbolTable (), class_def , module_name )
1358- if mro is None :
1359- mro = []
1360- if name != "builtins.object" :
1361- mro .append (self .oi )
1362- info .mro = [info ] + mro
1363- if bases is None :
1364- if mro :
1365- # By default, assume that there is a single non-generic base.
1366- bases = [Instance (mro [0 ], [])]
1367- else :
1368- bases = []
1369- info .bases = bases
1370-
1371- return info
1372-
13731336
13741337def neg_op (op : int ) -> int :
13751338 """Map SubtypeOf to SupertypeOf and vice versa."""
You can’t perform that action at this time.
0 commit comments