Skip to content

Commit

Permalink
Refactor ruff check fixes (#594)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkb79 authored Dec 26, 2024
1 parent 74952d9 commit a8596b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def activate_virtualenv_in_precommit_hooks(session: Session) -> None:
text = hook.read_text()

if not any(
Path("A") == Path("a") and bindir.lower() in text.lower() or bindir in text
(Path("A") == Path("a") and bindir.lower() in text.lower())
or bindir in text
for bindir in bindirs
):
continue
Expand Down
2 changes: 1 addition & 1 deletion src/audible/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
from .client import AsyncClient, Client


__all__ = ["__version__", "Authenticator", "log_helper", "Client", "AsyncClient"]
__all__ = ["AsyncClient", "Authenticator", "Client", "__version__", "log_helper"]
5 changes: 2 additions & 3 deletions src/audible/localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@


def search_template(key: str, value: str) -> dict[str, str] | None:
for country in LOCALE_TEMPLATES:
locale = LOCALE_TEMPLATES[country]
if locale[key] == value:
for country, locale in LOCALE_TEMPLATES.items():
if locale.get(key, "") == value:
logger.debug("found locale for %s", country)
return locale

Expand Down

0 comments on commit a8596b0

Please sign in to comment.