Skip to content

Commit

Permalink
Add pygobject-stubs for a bit better type coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jodal committed Feb 26, 2024
1 parent 9d76306 commit 2d5e881
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -31,7 +31,7 @@ dependencies = [
[project.optional-dependencies]
lint = ["ruff"]
test = ["pytest", "pytest-cov"]
typing = ["pyright"]
typing = ["pygobject-stubs", "pyright"]
dev = ["mopidy-mpd[lint,test,typing]", "tox"]

[project.urls]
Expand Down
8 changes: 4 additions & 4 deletions src/mopidy_mpd/network.py
Expand Up @@ -181,7 +181,7 @@ def stop(self) -> None:
if unix_socket_path is not None:
os.unlink(unix_socket_path) # noqa: PTH108

def register_server_socket(self, fileno: int) -> Any:
def register_server_socket(self, fileno: int) -> int:
return GLib.io_add_watch(fileno, GLib.IO_IN, self.handle_connection)

def handle_connection(self, _fd: int, _flags: int) -> bool:
Expand Down Expand Up @@ -274,9 +274,9 @@ def __init__( # noqa: PLR0913

self.stopping = False

self.recv_id = None
self.send_id = None
self.timeout_id = None
self.recv_id: int | None = None
self.send_id: int | None = None
self.timeout_id: int | None = None

protocol_kwargs: MpdSessionKwargs = {
"config": config,
Expand Down

0 comments on commit 2d5e881

Please sign in to comment.