MCPcopy Create free account
hub / github.com/executablebooks/markdown-it-py / from_dict

Method from_dict

markdown_it/token.py:173–178  ·  view source on GitHub ↗

Convert a dict to a Token.

(cls, dct: MutableMapping[str, Any])

Source from the content-addressed store, hash-verified

171
172 @classmethod
173 def from_dict(cls, dct: MutableMapping[str, Any]) -> Token:
174 """Convert a dict to a Token."""
175 token = cls(**dct)
176 if token.children:
177 token.children = [cls.from_dict(c) for c in token.children] # type: ignore[arg-type]
178 return token

Callers 1

test_serializationFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_serializationFunction · 0.64