diff --git a/pyproject.toml b/pyproject.toml index 48a4ce7..b4a7f51 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,9 +30,9 @@ dependencies = [ ] [project.optional-dependencies] -lint = ["ruff >= 0.5"] +lint = ["ruff >= 0.8.2"] test = ["pytest >= 7.2", "pytest-cov >= 4.0"] -typing = ["pygobject-stubs", "pyright"] +typing = ["pygobject-stubs >= 2.12.0", "pyright >= 1.1.380"] dev = ["mopidy-mpd[lint,test,typing]", "tox >= 4.21"] [project.urls] @@ -59,8 +59,6 @@ target-version = "py311" [tool.ruff.lint] select = ["ALL"] ignore = [ - "ANN101", # missing-type-self - "ANN102", # missing-type-cls "ANN401", # any-type "D", # pydocstyle "EM101", # raw-string-in-exception # TODO diff --git a/src/mopidy_mpd/translator.py b/src/mopidy_mpd/translator.py index 4b9b912..e40d822 100644 --- a/src/mopidy_mpd/translator.py +++ b/src/mopidy_mpd/translator.py @@ -44,9 +44,9 @@ def track_to_mpd_format( # noqa: C901, PLR0912, PLR0915 result: list[protocol.ResultTuple] = [ ("file", track.uri), - ("Time", track.length and (track.length // 1000) or 0), + ("Time", (track.length and (track.length // 1000)) or 0), *multi_tag_list(track.artists, "name", "Artist"), - ("Album", track.album and track.album.name or ""), + ("Album", (track.album and track.album.name) or ""), ] if stream_title is not None: