3838from typing import Any , Iterator , List , Optional , Sequence , Tuple , Union
3939
4040# 3rd party
41- import _pytest
42- import pytest
43- from _pytest .mark import MarkDecorator
41+ import pytest # nodep
42+ from _pytest .mark import MarkDecorator # nodep
4443
4544# this package
4645from domdf_python_tools .doctools import PYPY
@@ -239,7 +238,7 @@ def _make_version(version: Union[str, float, Tuple[int, ...]]) -> Version:
239238def min_version (
240239 version : Union [str , float , Tuple [int ]],
241240 reason : Optional [str ] = None ,
242- ) -> _pytest . mark . structures . MarkDecorator :
241+ ) -> MarkDecorator :
243242 """
244243 Factory function to return a ``@pytest.mark.skipif`` decorator that will
245244 skip a test if the current Python version is less than the required one.
@@ -264,7 +263,7 @@ def min_version(
264263def max_version (
265264 version : Union [str , float , Tuple [int ]],
266265 reason : Optional [str ] = None ,
267- ) -> _pytest . mark . structures . MarkDecorator :
266+ ) -> MarkDecorator :
268267 """
269268 Factory function to return a ``@pytest.mark.skipif`` decorator that will
270269 skip a test if the current Python version is greater than the required one.
@@ -286,7 +285,7 @@ def max_version(
286285 return pytest .mark .skipif (condition = sys .version_info [:3 ] > version_ , reason = reason )
287286
288287
289- def not_windows (reason : str = "Not required on Windows." , ) -> _pytest . mark . structures . MarkDecorator :
288+ def not_windows (reason : str = "Not required on Windows." , ) -> MarkDecorator :
290289 """
291290 Factory function to return a ``@pytest.mark.skipif`` decorator that will
292291 skip a test if the current platform is Windows.
@@ -301,7 +300,7 @@ def not_windows(reason: str = "Not required on Windows.", ) -> _pytest.mark.stru
301300 return pytest .mark .skipif (condition = sys .platform == "win32" , reason = reason )
302301
303302
304- def only_windows (reason : str = "Only required on Windows." , ) -> _pytest . mark . structures . MarkDecorator :
303+ def only_windows (reason : str = "Only required on Windows." , ) -> MarkDecorator :
305304 """
306305 Factory function to return a ``@pytest.mark.skipif`` decorator that will
307306 skip a test if the current platform is **not** Windows.
@@ -316,7 +315,7 @@ def only_windows(reason: str = "Only required on Windows.", ) -> _pytest.mark.st
316315 return pytest .mark .skipif (condition = sys .platform != "win32" , reason = reason )
317316
318317
319- def not_pypy (reason : str = "Not required on PyPy." ) -> _pytest . mark . structures . MarkDecorator :
318+ def not_pypy (reason : str = "Not required on PyPy." ) -> MarkDecorator :
320319 """
321320 Factory function to return a ``@pytest.mark.skipif`` decorator that will
322321 skip a test if the current Python implementation is PyPy.
@@ -331,7 +330,7 @@ def not_pypy(reason: str = "Not required on PyPy.") -> _pytest.mark.structures.M
331330 return pytest .mark .skipif (condition = PYPY , reason = reason )
332331
333332
334- def only_pypy (reason : str = "Only required on PyPy." ) -> _pytest . mark . structures . MarkDecorator :
333+ def only_pypy (reason : str = "Only required on PyPy." ) -> MarkDecorator :
335334 """
336335 Factory function to return a ``@pytest.mark.skipif`` decorator that will
337336 skip a test if the current Python implementation is not PyPy.
0 commit comments