From cde50db6e7ad263814b9542c9cb362d6cb7d7222 Mon Sep 17 00:00:00 2001 From: symonk Date: Sun, 25 Oct 2020 18:31:43 +0000 Subject: [PATCH] add type hint to parametrized warning_class --- testing/test_warning_types.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/test_warning_types.py b/testing/test_warning_types.py index b25daccc0..b49cc68f9 100644 --- a/testing/test_warning_types.py +++ b/testing/test_warning_types.py @@ -1,7 +1,7 @@ import inspect -import _pytest.warning_types import pytest +from _pytest import warning_types from _pytest.pytester import Pytester @@ -9,11 +9,11 @@ from _pytest.pytester import Pytester "warning_class", [ w - for n, w in vars(_pytest.warning_types).items() + for n, w in vars(warning_types).items() if inspect.isclass(w) and issubclass(w, Warning) ], ) -def test_warning_types(warning_class) -> None: +def test_warning_types(warning_class: UserWarning) -> None: """Make sure all warnings declared in _pytest.warning_types are displayed as coming from 'pytest' instead of the internal module (#5452). """