We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0410296 commit 68d1086Copy full SHA for 68d1086
importlib_resources/_compat.py
@@ -36,6 +36,12 @@ class ABC(object): # type: ignore
36
FileNotFoundError = OSError # type: ignore
37
38
39
+try:
40
+ NotADirectoryError = NotADirectoryError # type: ignore
41
+except NameError:
42
+ NotADirectoryError = OSError # type: ignore
43
+
44
45
try:
46
from zipfile import Path as ZipPath # type: ignore
47
except ImportError:
importlib_resources/readers.py
@@ -5,6 +5,7 @@
5
from . import abc
6
7
from ._compat import Path, ZipPath
8
+from ._compat import FileNotFoundError, NotADirectoryError
9
10
11
class FileReader(abc.TraversableResources):
0 commit comments