Skip to content

Commit

Permalink
Replace cast() with calling Locale() to ensure obj type
Browse files Browse the repository at this point in the history
  • Loading branch information
catileptic committed Jun 21, 2023
1 parent 0d36939 commit 7334c3a
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 7334c3a

Please sign in to comment.