[elbe-devel] [PATCH 7/9] elbevalidate: pytest: remove unused hook argument

Thomas Weißschuh thomas.weissschuh at linutronix.de
Fri Jun 21 14:22:50 CEST 2024


hook arguments are only supplied when necessary.
This allows the removal of the unused "path" argument, which also avoids
a warning:

    pytest.PytestRemovedIn9Warning: The (path: py.path.local) argument is deprecated, please use (file_path: pathlib.Path)

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbevalidate/pytest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbevalidate/pytest.py b/elbevalidate/pytest.py
index 2c6e296c5c48..60d422536fb3 100644
--- a/elbevalidate/pytest.py
+++ b/elbevalidate/pytest.py
@@ -36,7 +36,7 @@ class _ElbeValidationPlugin:
         bd = self._elbe_build_dir(config)
         return ['elbe build dir: ' + bd]
 
-    def pytest_collect_file(self, file_path, path, parent):
+    def pytest_collect_file(self, file_path, parent):
         if os.fspath(file_path) == os.fspath(self.test_script):
             return _MainModule.from_parent(parent, path=file_path)
 

-- 
2.45.2



More information about the elbe-devel mailing list