Skip to content

Commit

Permalink
Fix type hint for '__iter__' in 'SpecifierSet' (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
sinoroc authored May 28, 2020
1 parent 28a2e2b commit 59e1488
Showing 1 changed file with 2 additions and 12 deletions.
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

0 comments on commit 59e1488

Please sign in to comment.