Skip to content

Commit abebdb8

Browse files
committed
Add note about strange importlib.resource pattern.
1 parent 6fb9ce8 commit abebdb8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

numpydoc/tests/hooks/test_validate_hook.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313

1414
@pytest.fixture
1515
def example_module(request):
16+
# TODO: When Python3.13 is the minimum version supported version, this
17+
# can be simplified to:
18+
# with importlib.resources.path(numpydoc, "tests/hooks/example_module.py") as fpath:
19+
# fullpath = str(fpath)
1620
with importlib.resources.path(numpydoc, "tests") as fpath:
1721
fullpath = str(fpath / "hooks/example_module.py")
1822
return str(fullpath)

0 commit comments

Comments
 (0)