Skip to content

Commit

Permalink
Fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
lk-geimfari committed Dec 8, 2023
1 parent 43e2aae commit 836b00c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions mimesis/providers/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def address(self) -> str:
if self.locale == "ja":
return fmt.format(
self.random.choice(self.extract(["city"])),
# Generate list of random integers
# Generate a list of random integers
# in amount of 3, from 1 to 100.
*self.random.randints(amount=3, a=1, b=100),
)
Expand All @@ -107,7 +107,7 @@ def address(self) -> str:
)

def state(self, abbr: bool = False) -> str:
"""Get a random administrative district of country.
"""Get a random administrative district of the country.
:param abbr: Return ISO 3166-2 code.
:return: Administrative district.
Expand Down Expand Up @@ -164,7 +164,7 @@ def country_code(self, code: t.Optional[CountryCode] = CountryCode.A2) -> str:
"""Get a random code of country.
Default format is :attr:`~enums.CountryCode.A2` (ISO 3166-1-alpha2),
you can change it by passing parameter ``fmt`` with enum object
you can change it by passing parameter ``fmt`` with an enum object
:class:`~enums.CountryCode`.
:param code: Enum object CountryCode.
Expand Down
8 changes: 4 additions & 4 deletions mimesis/providers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def __init__(
) -> None:
"""Initialize attributes.
Keep in mind, that locale-independent data providers will work
only with keyword-only arguments since version 5.0.0.
Keep in mind that locale-independent data providers will work
only with keyword-only arguments.
:param seed: Seed for random.
When set to `None` the current system time is used.
Expand All @@ -56,7 +56,7 @@ def reseed(self, seed: Seed = MissingSeed) -> None:
"""Reseed the internal random generator.
In case we use the default seed, we need to create a per instance
random generator, in this case two providers with the same seed
random generator. In this case, two providers with the same seed
will always return the same values.
:param seed: Seed for random.
Expand All @@ -76,7 +76,7 @@ def validate_enum(self, item: t.Any, enum: t.Any) -> t.Any:
:param item: Item of an enum object.
:param enum: Enum object.
:return: Value of item.
:raises NonEnumerableError: if ``item`` not in ``enum``.
:raises NonEnumerableError: If ``item`` not in ``enum``.
"""
if item is None:
result = self.random.choice_enum_item(enum)
Expand Down

0 comments on commit 836b00c

Please sign in to comment.