Skip to content

Commit

Permalink
Update .abc.contents() to return an Iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcannon committed Apr 9, 2018
1 parent 2d5c1ef commit 35930c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions importlib_resources/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# We use mypy's comment syntax here since this file must be compatible with
# both Python 2 and 3.
try:
from typing import BinaryIO, Iterator, Text # noqa: F401
from typing import BinaryIO, Iterable, Text # noqa: F401
except ImportError:
# Python 2
pass
Expand Down Expand Up @@ -53,6 +53,6 @@ def is_resource(self, path):

@abstractmethod
def contents(self):
# type: () -> Iterator[str]
# type: () -> Iterable[str]
"""Return an iterator over the string contents of the package."""
raise FileNotFoundError

0 comments on commit 35930c6

Please sign in to comment.