MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / to_dict

Method to_dict

cmd2/parsing.py:225–227  ·  view source on GitHub ↗

Convert this Statement into a dictionary for use in persistent JSON history files.

(self)

Source from the content-addressed store, hash-verified

223 return shlex_split(self.args)
224
225 def to_dict(self) -> dict[str, Any]:
226 """Convert this Statement into a dictionary for use in persistent JSON history files."""
227 return asdict(self)
228
229 @classmethod
230 def from_dict(cls, source_dict: dict[str, Any]) -> Self:

Callers 2

test_statement_as_dictFunction · 0.45

Calls

no outgoing calls

Tested by 1

test_statement_as_dictFunction · 0.36