Fixups to placate Ruff linter
This commit is contained in:
parent
dc037a0a4b
commit
8e982e8a6b
2 changed files with 4 additions and 4 deletions
|
@ -48,7 +48,7 @@ mpd-now-playable = 'mpd_now_playable.cli:main'
|
||||||
start = {call = 'mpd_now_playable.cli:main'}
|
start = {call = 'mpd_now_playable.cli:main'}
|
||||||
lint = 'ruff check src/mpd_now_playable'
|
lint = 'ruff check src/mpd_now_playable'
|
||||||
typecheck = 'mypy -p mpd_now_playable'
|
typecheck = 'mypy -p mpd_now_playable'
|
||||||
check = {composite = ['lint', 'typecheck']}
|
check = {composite = ['lint', 'typecheck'], keep_going = true}
|
||||||
|
|
||||||
[tool.pdm.version]
|
[tool.pdm.version]
|
||||||
source = "scm"
|
source = "scm"
|
||||||
|
@ -71,7 +71,7 @@ dev = [
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
mypy_path = 'stubs'
|
mypy_path = 'stubs'
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff.lint]
|
||||||
ignore-init-module-imports = true
|
ignore-init-module-imports = true
|
||||||
select = [
|
select = [
|
||||||
# pycodestyle
|
# pycodestyle
|
||||||
|
|
|
@ -19,10 +19,10 @@ with suppress(ImportError):
|
||||||
class OrmsgpackSerializer(BaseSerializer):
|
class OrmsgpackSerializer(BaseSerializer):
|
||||||
DEFAULT_ENCODING = None
|
DEFAULT_ENCODING = None
|
||||||
|
|
||||||
def dumps(self, value: Any) -> bytes:
|
def dumps(self, value: object) -> bytes:
|
||||||
return ormsgpack.packb(value)
|
return ormsgpack.packb(value)
|
||||||
|
|
||||||
def loads(self, value: Optional[bytes]) -> Any:
|
def loads(self, value: Optional[bytes]) -> object:
|
||||||
if value is None:
|
if value is None:
|
||||||
return None
|
return None
|
||||||
return ormsgpack.unpackb(value)
|
return ormsgpack.unpackb(value)
|
||||||
|
|
Loading…
Reference in a new issue