diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 663bc64c206..19329cb21b8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,5 @@ +default_language_version: + python: "3.10" repos: - repo: https://github.com/psf/black rev: 22.8.0 diff --git a/src/_pytest/recwarn.py b/src/_pytest/recwarn.py index 06eb82d7191..0ab7ab2de4f 100644 --- a/src/_pytest/recwarn.py +++ b/src/_pytest/recwarn.py @@ -167,7 +167,7 @@ def warns( # noqa: F811 return func(*args[1:], **kwargs) -class WarningsRecorder(warnings.catch_warnings): +class WarningsRecorder(warnings.catch_warnings): # type:ignore[type-arg] """A context manager to record raised warnings. Each recorded warning is an instance of :class:`warnings.WarningMessage`.