Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fc3fdc9

Browse filesBrowse files
committed
Merge branch 'bugfix/83-typing' into 'master'
Alternate fix for ImportError on Python 3.5.{0-3} with flake8-typing-imports Closes python#83 See merge request python-devs/importlib_resources!91
2 parents a8a471c + 966c0a4 commit fc3fdc9
Copy full SHA for fc3fdc9

File tree

Expand file treeCollapse file tree

2 files changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-2
lines changed

‎importlib_resources/_py3.py

Copy file name to clipboardExpand all lines: importlib_resources/_py3.py
+2-2Lines 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,

‎tox.ini

Copy file name to clipboardExpand all lines: tox.ini
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ commands =
4040
deps =
4141
mypy
4242
flake8
43+
flake8-typing-imports
4344

4445

4546
[testenv:docs]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.