We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fc3fdc9 + 1c30e38 commit 06a4986Copy full SHA for 06a4986
importlib_resources/_py3.py
@@ -1,6 +1,5 @@
1
import os
2
import sys
3
-import typing
4
5
from . import abc as resources_abc
6
from . import trees
@@ -14,6 +13,8 @@
14
13
from typing import cast
15
from typing.io import BinaryIO, TextIO
16
+if False: # TYPE_CHECKING
17
+ from typing import ContextManager
18
19
Package = Union[ModuleType, str]
20
if sys.version_info >= (3, 6):
@@ -140,7 +141,7 @@ def files(package: Package) -> trees.Traversable:
140
141
142
def path(
143
package: Package, resource: Resource,
- ) -> 'typing.ContextManager[Path]':
144
+ ) -> 'ContextManager[Path]':
145
"""A context manager providing a file path object to the resource.
146
147
If the resource does not already exist on its own on the file system,
0 commit comments