Skip to content

Commit 0abadbb

Browse files
author
kx79wq
committed
ENH: use modules for importlib instead of strings
1 parent 003b6f8 commit 0abadbb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

histogrammar/resources.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,19 @@
2020

2121
# Resources lookup file for histogrammar
2222
from importlib import resources
23+
from histogrammar import test_data, notebooks
2324

2425

2526
# data files that are shipped with histogrammar.
2627
_DATA = {
2728
_.name: _
28-
for _ in resources.files("histogrammar.test_data").iterdir()
29+
for _ in resources.files(test_data).iterdir()
2930
}
3031

3132
# Tutorial notebooks
3233
_NOTEBOOK = {
3334
p.name: p
34-
for p in resources.files("histogrammar.notebooks").iterdir() if p.suffix == ".ipynb"
35+
for p in resources.files(notebooks).iterdir() if p.suffix == ".ipynb"
3536
}
3637

3738
# Resource types

0 commit comments

Comments
 (0)