This indicates at least for people using type checkers that these classes are not designed for inheritance and we make no stability guarantees regarding inheritance of them. Currently this doesn't show up in the docs. Sphinx does actually support `@final`, however it only works when imported directly from `typing`, while we import from `_pytest.compat`. In the future there might also be a `@sealed` decorator which would cover some more cases.
12 lines
260 B
Python
12 lines
260 B
Python
from _pytest.compat import final
|
|
|
|
|
|
@final
|
|
class UsageError(Exception):
|
|
"""Error in pytest usage or invocation."""
|
|
|
|
|
|
class PrintHelp(Exception):
|
|
"""Raised when pytest should print its help to skip the rest of the
|
|
argument parsing and validation."""
|