Skip to content

Commit

Permalink
Add type annotations for _candidate_paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Sep 9, 2024
1 parent d84ca37 commit a660475
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion importlib_resources/readers.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from __future__ import annotations

import collections
import contextlib
import itertools
import pathlib
import operator
import re
import warnings
from collections.abc import Iterator

from . import abc

Expand Down Expand Up @@ -150,7 +153,7 @@ def _resolve(cls, path_str) -> abc.Traversable:
return dir

@classmethod
def _candidate_paths(cls, path_str):
def _candidate_paths(cls, path_str: str) -> Iterator[abc.Traversable]:
yield pathlib.Path(path_str)
yield from cls._resolve_zip_path(path_str)

Expand Down

0 comments on commit a660475

Please sign in to comment.