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 17
17
CONTRAVARIANT ,
18
18
COVARIANT ,
19
19
ArgKind ,
20
- Block ,
21
- ClassDef ,
22
- SymbolTable ,
23
20
TypeInfo ,
24
21
)
25
22
from mypy .types import (
@@ -1336,40 +1333,6 @@ def visit_type_type(self, template: TypeType) -> list[Constraint]:
1336
1333
else :
1337
1334
return []
1338
1335
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
-
1373
1336
1374
1337
def neg_op (op : int ) -> int :
1375
1338
"""Map SubtypeOf to SupertypeOf and vice versa."""
You can’t perform that action at this time.
0 commit comments