Skip to content

Commit

Permalink
Replace NoReturn with Never type
Browse files Browse the repository at this point in the history
  • Loading branch information
jodal committed Nov 10, 2024
1 parent 609938a commit 812ac61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/mopidy_mpd/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -524,7 +524,7 @@ def encode(self, line: str) -> bytes:
self.encoding,
)
self.stop()
return NoReturn
return Never

def decode(self, line: bytes) -> str:
"""
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/mopidy_mpd/session.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()

0 comments on commit 812ac61

Please sign in to comment.