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

Method is_literal_context

mypy/checkexpr.py:3486–3487  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3484 )
3485
3486 def is_literal_context(self) -> bool:
3487 return is_literal_type_like(self.type_context[-1])
3488
3489 def infer_literal_expr_type(self, value: LiteralValue, fallback_name: str) -> Type:
3490 """Analyzes the given literal expression and determines if we should be

Callers 10

analyze_var_refMethod · 0.95
check_union_call_exprMethod · 0.95
check_callMethod · 0.95
lookup_operatorMethod · 0.95
visit_index_exprMethod · 0.95
visit_super_exprMethod · 0.95

Calls 1

is_literal_type_likeFunction · 0.90

Tested by

no test coverage detected