Skip to content

Commit 9b8039c

Browse files
committed
Sync {Session,Package}._recurse
1 parent b687f20 commit 9b8039c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/_pytest/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ def _collectfile(self, path, handle_dupes=True):
625625

626626
return ihook.pytest_collect_file(path=path, parent=self)
627627

628-
def _recurse(self, dirpath):
628+
def _recurse(self, dirpath: py.path.local) -> bool:
629629
if dirpath.basename == "__pycache__":
630630
return False
631631
ihook = self.gethookproxy(dirpath.dirpath())

src/_pytest/python.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,12 +571,12 @@ def setup(self):
571571
func = partial(_call_with_optional_argument, teardown_module, self.obj)
572572
self.addfinalizer(func)
573573

574-
def _recurse(self, dirpath):
574+
def _recurse(self, dirpath: py.path.local) -> bool:
575575
if dirpath.basename == "__pycache__":
576576
return False
577577
ihook = self.gethookproxy(dirpath.dirpath())
578578
if ihook.pytest_ignore_collect(path=dirpath, config=self.config):
579-
return
579+
return False
580580
for pat in self._norecursepatterns:
581581
if dirpath.check(fnmatch=pat):
582582
return False

0 commit comments

Comments
 (0)