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

Class HasUninhabitedComponentsQuery

mypy/checkexpr.py:6718–6725  ·  view source on GitHub ↗

Visitor for querying whether a type has an UninhabitedType component.

Source from the content-addressed store, hash-verified

6716
6717
6718class HasUninhabitedComponentsQuery(types.BoolTypeQuery):
6719 """Visitor for querying whether a type has an UninhabitedType component."""
6720
6721 def __init__(self) -> None:
6722 super().__init__(types.ANY_STRATEGY)
6723
6724 def visit_uninhabited_type(self, t: UninhabitedType) -> bool:
6725 return True
6726
6727
6728def has_ambiguous_uninhabited_component(t: Type) -> bool:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…