Skip to content

Commit 06a4986

Browse files
committed
Merge branch 'py35_compat' of https://gitlab.com/asottile/importlib_resources (!90)
2 parents fc3fdc9 + 1c30e38 commit 06a4986

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

importlib_resources/_py3.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import os
22
import sys
3-
import typing
43

54
from . import abc as resources_abc
65
from . import trees
@@ -14,6 +13,8 @@
1413
from typing import cast
1514
from typing.io import BinaryIO, TextIO
1615

16+
if False: # TYPE_CHECKING
17+
from typing import ContextManager
1718

1819
Package = Union[ModuleType, str]
1920
if sys.version_info >= (3, 6):
@@ -140,7 +141,7 @@ def files(package: Package) -> trees.Traversable:
140141

141142
def path(
142143
package: Package, resource: Resource,
143-
) -> 'typing.ContextManager[Path]':
144+
) -> 'ContextManager[Path]':
144145
"""A context manager providing a file path object to the resource.
145146
146147
If the resource does not already exist on its own on the file system,

0 commit comments

Comments
 (0)