MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / from_json

Method from_json

lean_py/registry.py:165–171  ·  view source on GitHub ↗
(cls, data: dict[str, Any])

Source from the content-addressed store, hash-verified

163
164 def matches(self, value: Any) -> bool:
165 """Return True if ``value`` is a plausible Python value for this type.
166
167 The runtime half of the unified interpretation: a structural predicate
168 used to validate arguments before marshalling. Scalars and containers
169 are checked precisely; ``named`` types are checked by identity when the
170 value is a Lean inductive value and accepted leniently otherwise (the
171 marshaller also accepts tuple/constructor spellings)."""
172 k = self.kind
173 if k == "unit":
174 return value is None

Callers

nothing calls this directly

Calls 1

from_jsonMethod · 0.45

Tested by

no test coverage detected