Thread-local storage used by Cmd2ArgumentParser to manage execution context.
| 551 | |
| 552 | @dataclass |
| 553 | class _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 | |
| 564 | class Cmd2ArgumentParser(argparse.ArgumentParser): |
no outgoing calls
no test coverage detected
searching dependent graphs…