Skip to content

Commit f6d4b21

Browse files
committed
typing: Testdir.__init__
1 parent 7c52a37 commit f6d4b21

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/_pytest/pytester.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
from _pytest.monkeypatch import MonkeyPatch
3636
from _pytest.pathlib import Path
3737
from _pytest.reports import TestReport
38+
from _pytest.tmpdir import TempdirFactory
3839

3940
if TYPE_CHECKING:
4041
from typing import Type
@@ -534,13 +535,13 @@ class Testdir:
534535
class TimeoutExpired(Exception):
535536
pass
536537

537-
def __init__(self, request, tmpdir_factory):
538+
def __init__(self, request: FixtureRequest, tmpdir_factory: TempdirFactory) -> None:
538539
self.request = request
539-
self._mod_collections = WeakKeyDictionary()
540+
self._mod_collections = WeakKeyDictionary() # type: ignore[var-annotated] # noqa: F821
540541
name = request.function.__name__
541542
self.tmpdir = tmpdir_factory.mktemp(name, numbered=True)
542543
self.test_tmproot = tmpdir_factory.mktemp("tmp-" + name, numbered=True)
543-
self.plugins = []
544+
self.plugins = [] # type: ignore[var-annotated] # noqa: F821
544545
self._cwd_snapshot = CwdSnapshot()
545546
self._sys_path_snapshot = SysPathsSnapshot()
546547
self._sys_modules_snapshot = self.__take_sys_modules_snapshot()

0 commit comments

Comments
 (0)