mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 06:32:53 +01:00
chore: clear typehinting errors
This commit is contained in:
1 parent
05fd95cd8e
commit
59959ae3a1
2 files changed
+13
-16
No files matched your search
@@ -1,14 +1,19 @@
|
||||
import logging
|
||||
import requests
|
||||
import shutil
|
||||
import subprocess
|
||||
import tarfile
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from dzgui.const.constants import (
|
||||
APP_NAME,
|
||||
TMP_EXE,
|
||||
TMP_PATH,
|
||||
TMP_TARBALL,
|
||||
)
|
||||
)
|
||||
from dzgui.strings import dialogs
|
||||
from dzgui.managers.threading import call_on_thread, StoredFunc, ThreadingManager
|
||||
from dzgui.views.dialogs.generic import ExceptionDialog, QuitDialog
|
||||
|
||||
import gi
|
||||
|
||||
@@ -20,13 +25,15 @@ if TYPE_CHECKING:
|
||||
|
||||
logger = logging.getLogger(APP_NAME)
|
||||
|
||||
class UpdateManager:
|
||||
def __init__(self) -> None:
|
||||
|
||||
self.thread_man = ThreadingManager()
|
||||
class UpdateManager:
|
||||
def __init__(self, controller: "Controller") -> None:
|
||||
|
||||
self.thread_man = ThreadingManager(controller)
|
||||
self.controller = controller
|
||||
|
||||
@call_on_thread(dialogs.fetching_update)
|
||||
def _update_version(self, exe_path: str, url: str) -> None:
|
||||
def update_version(self, exe_path: str, url: str) -> None:
|
||||
try:
|
||||
res = requests.get(url)
|
||||
if res.status_code == 200:
|
||||
|
||||
Reference in new issue
Block a user