From 3b80d41cd5cd5b1d83679ac5700b9f81a2150049 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sat, 10 Feb 2024 18:05:29 +0100 Subject: fix lint --- fietsboek/util.py | 8 +++++--- 1 file 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 -- cgit v1.2.3