From 68c98881fd1b94aa419698c60f4ff07f6f83bb3c Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 16 Jan 2025 13:12:07 +0700 Subject: [PATCH] remove invalid type hints --- setup.py | 5 ++--- xpra/client/pyglet/client.py | 2 +- xpra/client/qt6/client.py | 2 +- xpra/client/tk/client.py | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 3b5d5b1ec3..2a425b0af5 100755 --- a/setup.py +++ b/setup.py @@ -551,7 +551,7 @@ def du(path: str) -> int: return sum(os.path.getsize(f) for f in glob(f"{path}/**", recursive=True) if os.path.isfile(f)) -def build_package() -> None: +def build_package() -> int: if not LINUX: raise RuntimeError("packaging is not implemented here yet, use platform specific scripts instead") print("* installing beta repository tools and libraries") @@ -821,8 +821,7 @@ def show_help() -> None: sys.exit(0) if "package" in sys.argv: - build_package() - sys.exit(0) + sys.exit(build_package()) if "install-repo" in sys.argv: install_repo() diff --git a/xpra/client/pyglet/client.py b/xpra/client/pyglet/client.py index 171f89c4b6..faf4111634 100644 --- a/xpra/client/pyglet/client.py +++ b/xpra/client/pyglet/client.py @@ -85,7 +85,7 @@ def init_ui(self, opts) -> None: def cleanup(self) -> None: """ client classes must define this method """ - def setup_connection(self, conn) -> None: + def setup_connection(self, conn): protocol_class = get_client_protocol_class(conn.socktype) protocol = protocol_class(conn, self.process_packet, self.next_packet, scheduler=PygletScheduler()) log(f"setup_connection({conn}) {protocol=}") diff --git a/xpra/client/qt6/client.py b/xpra/client/qt6/client.py index 5d150803be..9b0d2d2d27 100755 --- a/xpra/client/qt6/client.py +++ b/xpra/client/qt6/client.py @@ -231,7 +231,7 @@ def init_ui(self, opts) -> None: def cleanup(self) -> None: """ client classes must define this method """ - def setup_connection(self, conn) -> None: + def setup_connection(self, conn): """ Warnings: * this only works for plain `tcp` sockets diff --git a/xpra/client/tk/client.py b/xpra/client/tk/client.py index e24e2d4db1..4ed8df8a83 100644 --- a/xpra/client/tk/client.py +++ b/xpra/client/tk/client.py @@ -68,7 +68,7 @@ def init_ui(self, opts) -> None: def cleanup(self) -> None: """ client classes must define this method """ - def setup_connection(self, conn) -> None: + def setup_connection(self, conn): protocol_class = get_client_protocol_class(conn.socktype) protocol = protocol_class(conn, self.process_packet, self.next_packet, scheduler=TkScheduler()) log(f"setup_connection({conn}) {protocol=}")