diff --git a/pkgs/development/python-modules/pylama/default.nix b/pkgs/development/python-modules/pylama/default.nix index 5349ee627470..907070c7419a 100644 --- a/pkgs/development/python-modules/pylama/default.nix +++ b/pkgs/development/python-modules/pylama/default.nix @@ -34,6 +34,7 @@ let (replaceVars ./paths.patch { git = "${lib.getBin git}/bin/git"; }) + ./pytest-9.1-compat.patch ]; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pylama/pytest-9.1-compat.patch b/pkgs/development/python-modules/pylama/pytest-9.1-compat.patch new file mode 100644 index 000000000000..ecb87ea853c5 --- /dev/null +++ b/pkgs/development/python-modules/pylama/pytest-9.1-compat.patch @@ -0,0 +1,18 @@ +diff --git a/pylama/pytest.py b/pylama/pytest.py +index 8009a51..3d1cb18 100644 +--- a/pylama/pytest.py ++++ b/pylama/pytest.py +@@ -41,10 +41,10 @@ def pytest_sessionfinish(session): + config.cache.set(HISTKEY, config._pylamamtimes) + + +-def pytest_collect_file(path, parent): ++def pytest_collect_file(file_path, parent): + config = parent.config +- if config.option.pylama and path.ext == ".py": +- return PylamaFile.from_parent(parent, path=pathlib.Path(path)) ++ if config.option.pylama and file_path.ext == ".py": ++ return PylamaFile.from_parent(parent, path=pathlib.Path(file_path)) + return None + +