[BUG] Typing of highlighter needs improvement
The type annotation of Highlighter.highlights should be ClassVar[tuple[str | re.pattern[str],...]] rather than implicit.
Otherwise linters (rightfully) complain that it is bad to use a mutable type (list) for a class variable (https://docs.astral.sh/ruff/rules/mutable-class-default/). Furthermore, mypy treates the variable as an instance variable and complains about it being overwritten, so it would be nice to make it a ClassVar
Thank you for your issue. Give us a little time to review it.
PS. You might want to check the FAQ if you haven't done so already.
Rich was created by Will McGugan. Consider sponsoring Will's work on Rich.
This is an automated reply, generated by FAQtory
I am williing to create a PR if there is traction, with 98 open PRs I am reluctant to preemptivly create one.