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

Class _ParserThreadLocals

cmd2/argparse_utils.py:553–561  ·  view source on GitHub ↗

Thread-local storage used by Cmd2ArgumentParser to manage execution context.

Source from the content-addressed store, hash-verified

551
552@dataclass
553class _ParserThreadLocals(threading.local):
554 """Thread-local storage used by Cmd2ArgumentParser to manage execution context."""
555
556 # The active output stream for help, usage, and errors. Since argparse does not
557 # pass the destination stream to the formatter factory, this transient value
558 # provides the context needed to synchronize Rich's rendering with the specific
559 # capabilities of the destination file descriptor. It is managed via the
560 # output_to() context manager.
561 current_output_file: IO[str] | None = None
562
563
564class Cmd2ArgumentParser(argparse.ArgumentParser):

Callers 1

Cmd2ArgumentParserClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…