From ba4b77914560b969748567f943573e8c6cfdc1dc Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Tue, 31 Jan 2023 19:44:47 -0800 Subject: [PATCH] Remove legacy settings --- comictaggerlib/ctoptions/file.py | 1 - comictaggerlib/taggerwindow.py | 6 +----- comictaggerlib/versionchecker.py | 6 +++--- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/comictaggerlib/ctoptions/file.py b/comictaggerlib/ctoptions/file.py index c5cab51..3d739d8 100644 --- a/comictaggerlib/ctoptions/file.py +++ b/comictaggerlib/ctoptions/file.py @@ -13,7 +13,6 @@ from comictaggerlib.defaults import DEFAULT_REPLACEMENTS, Replacement, Replaceme def general(parser: settngs.Manager) -> None: # General Settings parser.add_setting("check_for_new_version", default=False, cmdline=False) - parser.add_setting("send_usage_stats", default=False, cmdline=False) def internal(parser: settngs.Manager) -> None: diff --git a/comictaggerlib/taggerwindow.py b/comictaggerlib/taggerwindow.py index 98b2b05..edc9a99 100644 --- a/comictaggerlib/taggerwindow.py +++ b/comictaggerlib/taggerwindow.py @@ -2106,11 +2106,7 @@ Have fun! def check_latest_version_online(self) -> None: version_checker = VersionChecker() - self.version_check_complete( - version_checker.get_latest_version( - self.options[0].internal_install_id, self.options[0].general_send_usage_stats - ) - ) + self.version_check_complete(version_checker.get_latest_version(self.options[0].internal_install_id)) def version_check_complete(self, new_version: tuple[str, str]) -> None: if new_version[0] not in (self.version, self.options[0].dialog_dont_notify_about_this_version): diff --git a/comictaggerlib/versionchecker.py b/comictaggerlib/versionchecker.py index ce197f3..9fbca9c 100644 --- a/comictaggerlib/versionchecker.py +++ b/comictaggerlib/versionchecker.py @@ -25,16 +25,16 @@ logger = logging.getLogger(__name__) class VersionChecker: - def get_request_url(self, uuid: str, use_stats: bool) -> tuple[str, dict[str, str]]: + def get_request_url(self, uuid: str) -> tuple[str, dict[str, str]]: base_url = "https://api.github.com/repos/comictagger/comictagger/releases/latest" params: dict[str, str] = {} return base_url, params - def get_latest_version(self, uuid: str, use_stats: bool = True) -> tuple[str, str]: + def get_latest_version(self, uuid: str) -> tuple[str, str]: try: - url, params = self.get_request_url(uuid, use_stats) + url, params = self.get_request_url(uuid) release = requests.get( url, params=params,