Skip to content

Commit

Permalink
Type fixes from 961
Browse files Browse the repository at this point in the history
  • Loading branch information
DenverCoder1 committed Feb 3, 2023
1 parent 9b67367 commit 053c242
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions babel/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def get_territory_name(self, locale: Locale | str | None = None) -> str | None:
if locale is None:
locale = self
locale = Locale.parse(locale)
return locale.territories.get(self.territory)
return locale.territories.get(self.territory or '')

territory_name = property(get_territory_name, doc="""\
The localized territory name of the locale if available.
Expand All @@ -517,7 +517,7 @@ def get_script_name(self, locale: Locale | str | None = None) -> str | None:
if locale is None:
locale = self
locale = Locale.parse(locale)
return locale.scripts.get(self.script)
return locale.scripts.get(self.script or '')

script_name = property(get_script_name, doc="""\
The localized script name of the locale if available.
Expand Down

0 comments on commit 053c242

Please sign in to comment.