From 76c1dd2480175777bbb4098bac5402f2acba2fbb Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Mon, 7 Oct 2024 10:04:42 +0200 Subject: [PATCH] fix pytest deprecation --- examples/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/conftest.py b/examples/conftest.py index 0d2d43d..163ad94 100644 --- a/examples/conftest.py +++ b/examples/conftest.py @@ -4,13 +4,13 @@ import pytest -def pytest_collect_file(path, parent): +def pytest_collect_file(file_path: Path, parent): """Pytest hook. Create a collector for the given path, or None if not relevant. The new node needs to have the specified parent as parent. """ - p = Path(path) + p = Path(file_path) if p.suffix == ".py" and "example" in p.name: return Script.from_parent(parent, path=p, name=p.name)