MCPcopy
hub / github.com/python/mypy / snapshot_type

Function snapshot_type

mypy/server/astdiff.py:333–335  ·  view source on GitHub ↗

Create a snapshot representation of a type using nested tuples.

(typ: Type)

Source from the content-addressed store, hash-verified

331
332
333def snapshot_type(typ: Type) -> SnapshotItem:
334 """Create a snapshot representation of a type using nested tuples."""
335 return typ.accept(SnapshotTypeVisitor())
336
337
338def snapshot_optional_type(typ: Type | None) -> SnapshotItem:

Callers 15

snapshot_symbol_tableFunction · 0.85
snapshot_definitionFunction · 0.85
snapshot_optional_typeFunction · 0.85
snapshot_typesFunction · 0.85
visit_instanceMethod · 0.85
visit_type_varMethod · 0.85
visit_param_specMethod · 0.85
visit_type_var_tupleMethod · 0.85
visit_unpack_typeMethod · 0.85
visit_callable_typeMethod · 0.85
visit_typeddict_typeMethod · 0.85
visit_literal_typeMethod · 0.85

Calls 2

SnapshotTypeVisitorClass · 0.85
acceptMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…