0.3.14 code cleanup

This commit is contained in:
Adam Saudagar 2020-10-14 07:59:06 +05:30
parent 0b75bb1820
commit ee8392e426
5 changed files with 5 additions and 8 deletions

View File

@ -3,8 +3,6 @@ import logging
import os
import sys
import traceback
from threading import Thread
import win32con
import win32gui

View File

@ -29,13 +29,13 @@ class GUI:
self._bot_running = False
# UI items
self._root: ThemedTk = None
self._root: ThemedTk
self._console = None
self._start_button = None
self._notify = None
self._notify_check = None
self._engine_select: OptionMenu = None
self._config_button: Button = None
self._engine_select: OptionMenu
self._config_button: Button
self._engine_var = None
self._thread = threading.Thread(target=self.create, args=())

View File

@ -43,7 +43,7 @@ def _run_terms_window(config: Config):
g1 = Frame(f)
Checkbutton(g1, command=disable_enable_button, variable=check_value).pack(side=LEFT)
text = Text(g1, width=len(hyperlinkPattern.sub('\g<title>', message)),
text = Text(g1, width=len(hyperlinkPattern.sub(r'\g<title>', message)),
height=1, borderwidth=0, highlightthickness=0)
text["background"] = root["background"]

View File

@ -50,7 +50,7 @@ def _get_highest_version(index, pkg):
for link in soup.find_all('a'):
text = link.get_text()
try:
version = re.search(pkg + '-(.*)\.tar\.gz', text).group(1)
version = re.search(pkg + r'-(.*)\.tar\.gz', text).group(1)
versions.append(_normalize_version(version))
except AttributeError:
pass

View File

@ -4,7 +4,6 @@ import sys
import threading
import traceback
import webbrowser
import win32gui
from threading import Thread
from zipfile import ZipFile