Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_commit: v2.1.3
_commit: v2.2.0
_src_path: gh:mopidy/mopidy-ext-template
author_email: [email protected]
author_full_name: Stein Magnus Jodal
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,47 @@ on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
name: Build
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: hynek/build-and-inspect-python-package@v2

main:
strategy:
fail-fast: false
matrix:
include:
- name: "pytest (3.11)"
python: "3.11"
tox: "3.11"
- name: "pytest (3.12)"
python: "3.12"
tox: "3.12"
- name: "pytest (3.13)"
python: "3.13"
tox: "3.13"
- name: "pytest (3.14)"
python: "3.14"
tox: "3.14"
coverage: true
- name: "pyright"
python: "3.13"
python: "3.14"
tox: "pyright"
- name: "ruff check"
python: "3.13"
python: "3.14"
tox: "ruff-check"
- name: "ruff format"
python: "3.13"
python: "3.14"
tox: "ruff-format"

name: ${{ matrix.name }}
runs-on: ubuntu-24.04
container: ghcr.io/mopidy/ci:latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Fix home dir permissions to enable pip caching
run: chown -R root /github/home
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
cache: pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: hynek/build-and-inspect-python-package@v2
id: build
- uses: actions/download-artifact@v4
Expand Down
22 changes: 16 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "mopidy-local"
description = "Mopidy extension for playing music from your local music archive"
readme = "README.md"
requires-python = ">= 3.11"
requires-python = ">= 3.13"
license = { text = "Apache-2.0" }
authors = [{ name = "Stein Magnus Jodal", email = "[email protected]" }]
classifiers = [
Expand All @@ -13,7 +13,11 @@ classifiers = [
"Topic :: Multimedia :: Sound/Audio :: Players",
]
dynamic = ["version"]
dependencies = ["mopidy >= 4.0.0a3", "pykka >= 4", "uritools >= 4"]
dependencies = [
"mopidy >= 4.0.0a7",
"pykka >= 4.1",
"uritools >= 4.0.3",
]

[project.urls]
Homepage = "https://github.com/mopidy/mopidy-local"
Expand All @@ -23,7 +27,7 @@ local = "mopidy_local:Extension"


[build-system]
requires = ["setuptools >= 66", "setuptools-scm >= 7.1"]
requires = ["setuptools >= 78", "setuptools-scm >= 8.2"]
build-backend = "setuptools.build_meta"


Expand All @@ -50,7 +54,7 @@ show_missing = true


[tool.pyright]
pythonVersion = "3.11"
pythonVersion = "3.13"
typeCheckingMode = "standard"
# Not all dependencies have type hints:
reportMissingTypeStubs = false
Expand All @@ -68,7 +72,7 @@ filterwarnings = [


[tool.ruff]
target-version = "py311"
target-version = "py313"

[tool.ruff.lint]
select = ["ALL"]
Expand Down Expand Up @@ -118,7 +122,13 @@ ignore = [


[tool.tox]
env_list = ["3.11", "3.12", "3.13", "pyright", "ruff-check", "ruff-format"]
env_list = [
"3.13",
"3.14",
"pyright",
"ruff-check",
"ruff-format",
]

[tool.tox.env_run_base]
package = "wheel"
Expand Down
6 changes: 3 additions & 3 deletions src/mopidy_local/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ def get_config_schema(self):
return schema

def setup(self, registry):
from .actor import LocalBackend
from .actor import LocalBackend # noqa: PLC0415

registry.add("backend", LocalBackend)
registry.add("http:app", {"name": self.ext_name, "factory": self.webapp})

def get_command(self):
from .commands import LocalCommand
from .commands import LocalCommand # noqa: PLC0415

return LocalCommand()

def webapp(self, config, core): # noqa: ARG002
from .web import ImageHandler, IndexHandler
from .web import ImageHandler, IndexHandler # noqa: PLC0415

image_dir = self.get_image_dir(config)
return [
Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def wrapper(self):
return wrapper


class IsA:
class IsA: # noqa: PLW1641
def __init__(self, klass):
self.klass = klass

Expand Down
6 changes: 3 additions & 3 deletions tests/test_playback.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ def trigger_about_to_finish(self):
def setUp(self):
self.audio = dummy_audio.create_proxy()
self.backend = cast(
backend.BackendProxy,
"backend.BackendProxy",
actor.LocalBackend.start(
config=self.config,
audio=self.audio,
).proxy(),
)
self.core = cast(
core.CoreProxy,
"core.CoreProxy",
core.Core.start(
audio=self.audio,
backends=[self.backend],
Expand Down Expand Up @@ -1048,7 +1048,7 @@ def test_play_track_then_enable_random(self, shuffle_mock):
# Covers underlying issue IssueGH17RegressionTest tests for.
shuffle_mock.side_effect = lambda tracks: tracks.reverse()

expected = self.tl_tracks.get()[::-1] + [None]
expected = [*self.tl_tracks.get()[::-1], None]
actual = []

self.playback.play().get()
Expand Down