Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type hint for '__iter__' in 'SpecifierSet' #310

Merged
merged 1 commit into from
May 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions packaging/specifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,7 @@
from .version import Version, LegacyVersion, parse

if TYPE_CHECKING: # pragma: no cover
from typing import (
List,
Dict,
Union,
Iterable,
Iterator,
Optional,
Callable,
Tuple,
FrozenSet,
)
from typing import List, Dict, Union, Iterable, Iterator, Optional, Callable, Tuple

ParsedVersion = Union[Version, LegacyVersion]
UnparsedVersion = Union[Version, LegacyVersion, str]
Expand Down Expand Up @@ -750,7 +740,7 @@ def __len__(self):
return len(self._specs)

def __iter__(self):
# type: () -> Iterator[FrozenSet[_IndividualSpecifier]]
# type: () -> Iterator[_IndividualSpecifier]
return iter(self._specs)

@property
Expand Down