Skip to content

Commit

Permalink
Bump Ruff to 0.8.2 and fix new lints
Browse files Browse the repository at this point in the history
  • Loading branch information
jodal committed Dec 10, 2024
1 parent a06640b commit 4538f0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/mopidy_mpd/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4538f0e

Please sign in to comment.