Skip to content

Commit

Permalink
fix importlib.resources for Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
FriedrichFroebel committed Nov 22, 2023
1 parent 6822d03 commit d0b4133
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"black",
"flake8",
"pep8-naming",
'importlib-resources; python_version < "3.9"',
],
"mypy": [
"mypy",
Expand Down
5 changes: 4 additions & 1 deletion tests/test_labels.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from importlib.resources import as_file, files
try:
from importlib.resources import as_file, files
except ImportError:
from importlib_resources import as_file, files # type: ignore[import-not-found,no-redef]
from tempfile import NamedTemporaryFile
from unittest import mock

Expand Down

0 comments on commit d0b4133

Please sign in to comment.