Skip to content

Commit

Permalink
Remove Collection[str] type from ElementTypes (#2134)
Browse files Browse the repository at this point in the history
  • Loading branch information
tvuotila authored Nov 12, 2024
1 parent 151b47d commit edaeed6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions faker/providers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
_re_cir = re.compile(r"\^")

T = TypeVar("T")
ElementsType = Union[Collection[str], Collection[T], OrderedDictType[T, float]]
ElementsType = Union[Collection[T], OrderedDictType[T, float]]


class BaseProvider:
Expand Down Expand Up @@ -533,7 +533,7 @@ def random_choices(
"""
return self.random_elements(elements, length, unique=False)

def random_element(self, elements: ElementsType[T] = ("a", "b", "c")) -> T:
def random_element(self, elements: ElementsType[T] = ("a", "b", "c")) -> T: # type: ignore[assignment]
"""Generate a randomly sampled object from ``elements``.
For information on the ``elements`` argument, please refer to
Expand Down

0 comments on commit edaeed6

Please sign in to comment.