Rich is a Python library for rich text and beautiful formatting in the terminal.
perf: eliminate inspect imports from protocol.py, repr.py, and syntax.py
- syntax.py: move Console, ConsoleOptions, JustifyMethod, RenderResult to TYPE_CHECKING (already has future annotations). Eliminates rich.console from syntax's import chain entirely. - protocol.py: replace `from inspect import isclass` with `isinstance(x, type)` — identical behavior, no import needed. - repr.py: defer `import inspect` into auto_rich_repr() where inspect.signature() is actually used. None of these save time yet (inspect still comes in via dataclasses), but they become free wins once dataclasses is removed from console.py.
K
Kevin Turcios committed
63d3200199f6d4a01268d71f98f27dbe416ee268
Parent: 38f9aac