diff options
author | Daniel Schadt <kingdread@gmx.de> | 2024-02-10 18:05:29 +0100 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2024-02-10 18:05:29 +0100 |
commit | 3b80d41cd5cd5b1d83679ac5700b9f81a2150049 (patch) | |
tree | 3241a2c50a2eb6e86a85c42fdd4d345ee4c8a5a3 | |
parent | 416419a357de2a2311d8b2f972c21f3444fd8c2f (diff) | |
download | fietsboek-3b80d41cd5cd5b1d83679ac5700b9f81a2150049.tar.gz fietsboek-3b80d41cd5cd5b1d83679ac5700b9f81a2150049.tar.bz2 fietsboek-3b80d41cd5cd5b1d83679ac5700b9f81a2150049.zip |
fix lint
-rw-r--r-- | fietsboek/util.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fietsboek/util.py b/fietsboek/util.py index ecf5b66..da3d530 100644 --- a/fietsboek/util.py +++ b/fietsboek/util.py @@ -311,6 +311,7 @@ def check_password_constraints(password: str, repeat_password: Optional[str] = N if len(password) < 8: raise ValueError(_("password_constraint.length")) + def _locale_packages(locale_packages: Optional[list[str]] = None) -> list[str]: # We expect this to be "fietsboek", but we are open to forks. my_package = __name__.split(".", 1)[0] @@ -395,14 +396,15 @@ def list_locales(locale_packages: Optional[list[str]] = None) -> list[tuple[str, continue locale_name = potential_locale.name try: - display_name = ((potential_locale / DISPLAY_NAME_PATH) - .read_text(encoding="utf-8")) + display_name = (potential_locale / DISPLAY_NAME_PATH).read_text( + encoding="utf-8" + ) except FileNotFoundError: display_name = locale_name locales.append((locale_name, display_name)) except FileNotFoundError: continue - locales.sort(key=lambda l: l[0]) + locales.sort(key=lambda locale: locale[0]) return locales |