We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9daa581 commit 9fbef6fCopy full SHA for 9fbef6f
1 file changed
src/correctionlib/util.py
@@ -12,10 +12,5 @@ def this_module_path() -> pathlib.Path:
12
13
return pathlib.Path(pkg_resources.resource_filename("correctionlib", ""))
14
15
- # get a real path out of the traversable
16
- paths = [
17
- p
18
- for p in importlib.resources.files("correctionlib").iterdir()
19
- if isinstance(p, pathlib.Path)
20
- ]
21
- return pathlib.Path(paths[0].parent)
+ with importlib.resources.path("correctionlib", "") as fspath:
+ return fspath
0 commit comments