Skip to content

Commit c85b051

Browse files
committed
typing: Testdir.plugins
1 parent 0b3b55d commit c85b051

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/_pytest/pytester.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
if TYPE_CHECKING:
4444
from typing import Type
4545

46+
_PluggyPlugin = object
47+
4648
import pexpect
4749

4850

@@ -546,7 +548,7 @@ def __init__(self, request: FixtureRequest, tmpdir_factory: TempdirFactory) -> N
546548
name = request.function.__name__
547549
self.tmpdir = tmpdir_factory.mktemp(name, numbered=True)
548550
self.test_tmproot = tmpdir_factory.mktemp("tmp-" + name, numbered=True)
549-
self.plugins = [] # type: ignore[var-annotated] # noqa: F821
551+
self.plugins = [] # type: Sequence[Union[str, "_PluggyPlugin"]]
550552
self._cwd_snapshot = CwdSnapshot()
551553
self._sys_path_snapshot = SysPathsSnapshot()
552554
self._sys_modules_snapshot = self.__take_sys_modules_snapshot()

0 commit comments

Comments
 (0)