MCPcopy Index your code
hub / github.com/python/mypy / check_tuple_items_valid_literals

Method check_tuple_items_valid_literals

mypyc/analysis/ircheck.py:305–310  ·  view source on GitHub ↗
(self, op: LoadLiteral, t: tuple[object, ...])

Source from the content-addressed store, hash-verified

303 pass
304
305 def check_tuple_items_valid_literals(self, op: LoadLiteral, t: tuple[object, ...]) -> None:
306 for x in t:
307 if x is not None and not isinstance(x, (str, bytes, bool, int, float, complex, tuple)):
308 self.fail(op, f"Invalid type for item of tuple literal: {type(x)})")
309 if isinstance(x, tuple):
310 self.check_tuple_items_valid_literals(op, x)
311
312 def check_frozenset_items_valid_literals(self, op: LoadLiteral, s: frozenset[object]) -> None:
313 for x in s:

Callers 2

visit_load_literalMethod · 0.95

Calls 3

failMethod · 0.95
isinstanceFunction · 0.85
typeClass · 0.85

Tested by

no test coverage detected