Skip to content

Commit

Permalink
[nit] use explicit types for country overload
Browse files Browse the repository at this point in the history
  • Loading branch information
jicruz96 committed Jul 25, 2024
1 parent 89ae766 commit ff92eb4
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions geonamescache/mappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
from geonamescache import GeonamesCache

from . import mappings
from .types import ContinentCode, CountryFields, CountryNumericFields
from .types import (ContinentCode, CountryFields, CountryNumericFields,
CountryStringFields)


@overload
Expand All @@ -16,20 +17,7 @@ def country(
@overload
def country(
from_key: str = "name",
to_key: Literal[
"capital",
"currencycode",
"currencyname",
"iso",
"iso3",
"fips",
"languages",
"name",
"neighbours",
"phone",
"postalcoderegex",
"tld",
] = "iso",
to_key: CountryStringFields = "iso",
) -> Callable[[str], str]: ...


Expand Down

0 comments on commit ff92eb4

Please sign in to comment.