|
19 | 19 | from _pytest.compat import getfslineno |
20 | 20 | from _pytest.compat import TYPE_CHECKING |
21 | 21 | from _pytest.config import Config |
| 22 | +from _pytest.config import PytestPluginManager |
22 | 23 | from _pytest.deprecated import NODE_USE_FROM_PARENT |
23 | 24 | from _pytest.fixtures import FixtureDef |
24 | 25 | from _pytest.fixtures import FixtureLookupError |
@@ -418,12 +419,14 @@ def _check_initialpaths_for_relpath(session, fspath): |
418 | 419 |
|
419 | 420 |
|
420 | 421 | class FSHookProxy: |
421 | | - def __init__(self, fspath, pm, remove_mods): |
| 422 | + def __init__( |
| 423 | + self, fspath: py.path.local, pm: PytestPluginManager, remove_mods |
| 424 | + ) -> None: |
422 | 425 | self.fspath = fspath |
423 | 426 | self.pm = pm |
424 | 427 | self.remove_mods = remove_mods |
425 | 428 |
|
426 | | - def __getattr__(self, name): |
| 429 | + def __getattr__(self, name: str): |
427 | 430 | x = self.pm.subset_hook_caller(name, remove_plugins=self.remove_mods) |
428 | 431 | self.__dict__[name] = x |
429 | 432 | return x |
@@ -459,7 +462,7 @@ def __init__( |
459 | 462 | def from_parent(cls, parent, *, fspath): |
460 | 463 | return cls._create(parent=parent, fspath=fspath) |
461 | 464 |
|
462 | | - def _gethookproxy(self, fspath): |
| 465 | + def _gethookproxy(self, fspath: py.path.local): |
463 | 466 | # check if we have the common case of running |
464 | 467 | # hooks with all conftest.py files |
465 | 468 | pm = self.config.pluginmanager |
|
0 commit comments