python3Packages.pylama: fix pytest 9.1 compat
This commit is contained in:
@@ -34,6 +34,7 @@ let
|
||||
(replaceVars ./paths.patch {
|
||||
git = "${lib.getBin git}/bin/git";
|
||||
})
|
||||
./pytest-9.1-compat.patch
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user