Skip to content

Commit f08ec1c

Browse files
committed
Fix typing error by not importing a name that may or may not exist. Fixes python#83.
1 parent b2f1945 commit f08ec1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

importlib_resources/_py3.py

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

45
from . import abc as resources_abc
56
from . import trees
@@ -10,7 +11,6 @@
1011
from pathlib import Path
1112
from types import ModuleType
1213
from typing import Iterable, Iterator, Optional, Set, Union # noqa: F401
13-
from typing import ContextManager
1414
from typing import cast
1515
from typing.io import BinaryIO, TextIO
1616

@@ -140,7 +140,7 @@ def files(package: Package) -> trees.Traversable:
140140

141141
def path(
142142
package: Package, resource: Resource,
143-
) -> ContextManager[Path]:
143+
) -> typing.ContextManager[Path]:
144144
"""A context manager providing a file path object to the resource.
145145
146146
If the resource does not already exist on its own on the file system,

0 commit comments

Comments
 (0)