Fixups to placate Ruff linter

This commit is contained in:
Danielle McLean 2024-06-22 18:39:10 +10:00
parent dc037a0a4b
commit 8e982e8a6b
Signed by: 00dani
GPG key ID: 6854781A0488421C
2 changed files with 4 additions and 4 deletions

View file

@ -48,7 +48,7 @@ mpd-now-playable = 'mpd_now_playable.cli:main'
start = {call = 'mpd_now_playable.cli:main'}
lint = 'ruff check src/mpd_now_playable'
typecheck = 'mypy -p mpd_now_playable'
check = {composite = ['lint', 'typecheck']}
check = {composite = ['lint', 'typecheck'], keep_going = true}
[tool.pdm.version]
source = "scm"
@ -71,7 +71,7 @@ dev = [
[tool.mypy]
mypy_path = 'stubs'
[tool.ruff]
[tool.ruff.lint]
ignore-init-module-imports = true
select = [
# pycodestyle

View file

@ -19,10 +19,10 @@ with suppress(ImportError):
class OrmsgpackSerializer(BaseSerializer):
DEFAULT_ENCODING = None
def dumps(self, value: Any) -> bytes:
def dumps(self, value: object) -> bytes:
return ormsgpack.packb(value)
def loads(self, value: Optional[bytes]) -> Any:
def loads(self, value: Optional[bytes]) -> object:
if value is None:
return None
return ormsgpack.unpackb(value)