Skip to content

Commit

Permalink
Replace cast() with calling Locale() to ensure obj type (#1140)
Browse files Browse the repository at this point in the history
  • Loading branch information
catileptic authored Jun 22, 2023
1 parent 7a9de99 commit 5899ab2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion followthemoney/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def set_model_locale(locale: Locale) -> None:
def get_locale() -> Locale:
if not hasattr(state, "locale"):
return Locale.parse(DEFAULT_LOCALE)
return cast(Locale, state.locale)
return Locale.parse(state.locale)


def get_env_list(name: str, default: List[str] = []) -> List[str]:
Expand Down

0 comments on commit 5899ab2

Please sign in to comment.