diff --git a/src/mopidy_mpd/network.py b/src/mopidy_mpd/network.py index 2e60988..ecf0ff0 100644 --- a/src/mopidy_mpd/network.py +++ b/src/mopidy_mpd/network.py @@ -8,7 +8,7 @@ import socket import sys import threading -from typing import TYPE_CHECKING, Any, NoReturn +from typing import TYPE_CHECKING, Any, Never import pykka from gi.repository import GLib # pyright: ignore[reportMissingModuleSource] @@ -524,7 +524,7 @@ def encode(self, line: str) -> bytes: self.encoding, ) self.stop() - return NoReturn + return Never def decode(self, line: bytes) -> str: """ @@ -541,7 +541,7 @@ def decode(self, line: bytes) -> str: self.encoding, ) self.stop() - return NoReturn + return Never def join_lines(self, lines: list[str]) -> str: if not lines: diff --git a/src/mopidy_mpd/session.py b/src/mopidy_mpd/session.py index 05dc88c..63bc3ef 100644 --- a/src/mopidy_mpd/session.py +++ b/src/mopidy_mpd/session.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import TYPE_CHECKING, NoReturn, TypedDict +from typing import TYPE_CHECKING, Never, TypedDict from mopidy_mpd import dispatcher, formatting, network, protocol, types from mopidy_mpd.protocol import tagtype_list @@ -86,7 +86,7 @@ def decode(self, line: bytes) -> str: "supplied by client was not valid." ) self.stop() - return NoReturn + return Never def close(self) -> None: self.stop()