Skip to content

Commit

Permalink
Prepare for upcoming pytest 7.0 deprecations (part 2)
Browse files Browse the repository at this point in the history
This follows up asmeurer#42, we decided that using just `fspath` as the new
parameter that users should use would be confusing because it is too
close to `path` and also we have `fspath` already in some places of
the pytest public API (see pytest-dev/pytest#9283).

This PR updates the hook affected by this new change in pytest-dev/pytest#9363.
  • Loading branch information
nicoddemus committed Dec 1, 2021
1 parent dac0f2c commit 7383a95
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pytest_flakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ def __init__(self, config):
self.mtimes = config.cache.get(HISTKEY, {})

if PYTEST_GTE_7:
def pytest_collect_file(self, fspath, parent):
def pytest_collect_file(self, file_path, parent):
config = parent.config
if config.option.flakes and isPythonFile(str(fspath)):
flakesignore = self.ignore(fspath)
if config.option.flakes and isPythonFile(str(file_path)):
flakesignore = self.ignore(file_path)
if flakesignore is not None:
return FlakesFile.from_parent(parent,
path=fspath,
path=file_path,
flakesignore=flakesignore)
else:
def pytest_collect_file(self, path, parent):
Expand Down

0 comments on commit 7383a95

Please sign in to comment.