From 74ebba20b4b2a3a2c5da36f07cffaf987c85a4b8 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sun, 4 Dec 2022 15:08:38 +0000 Subject: [PATCH] update.py: Remove unused 'global root' & some more typing `global root` was never removed after `self.root` became a thing. --- update.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/update.py b/update.py index ce8e4924..a44f4426 100644 --- a/update.py +++ b/update.py @@ -72,7 +72,7 @@ class Updater(object): """ self.root: Optional['tk.Tk'] = tkroot self.provider: str = provider - self.thread: threading.Thread = None + self.thread: Optional[threading.Thread] = None if self.use_internal(): return @@ -81,7 +81,7 @@ class Updater(object): import ctypes try: - self.updater = ctypes.cdll.WinSparkle + self.updater: Optional[ctypes.CDLL] = ctypes.cdll.WinSparkle # Set the appcast URL self.updater.win_sparkle_set_appcast_url(update_feed.encode()) @@ -94,8 +94,6 @@ class Updater(object): self.updater.win_sparkle_set_app_build_version(str(appversion_nobuild())) # set up shutdown callback - global root - root = tkroot self.callback_t = ctypes.CFUNCTYPE(None) # keep reference self.callback_fn = self.callback_t(self.shutdown_request) self.updater.win_sparkle_set_shutdown_request_callback(self.callback_fn)