@@ -32,11 +32,9 @@ def do_nothing(*_): ...
3232from copy import deepcopy
3333from time import time
3434from types import FunctionType
35- from typing import NoReturn , override
35+ from typing import TYPE_CHECKING , NoReturn , override
3636
3737import cv2
38- from cv2 .typing import MatLike
39- from gen import about , design , settings , update_checker
4038from PySide6 import QtCore , QtGui
4139from PySide6 .QtTest import QTest
4240from PySide6 .QtWidgets import QApplication , QFileDialog , QLabel , QMainWindow , QMessageBox
@@ -45,7 +43,9 @@ def do_nothing(*_): ...
4543import user_profile
4644from AutoControlledThread import AutoControlledThread
4745from AutoSplitImage import START_KEYWORD , AutoSplitImage , ImageType
48- from capture_method import CaptureMethodBase , CaptureMethodEnum
46+ from capture_method import CaptureMethodEnum
47+ from capture_method .CaptureMethodBase import CaptureMethodBase
48+ from gen import about , design , settings , update_checker
4949from hotkeys import (
5050 HOTKEYS ,
5151 KEYBOARD_GROUPS_ISSUE ,
@@ -87,6 +87,9 @@ def do_nothing(*_): ...
8787 open_file ,
8888)
8989
90+ if TYPE_CHECKING :
91+ from cv2 .typing import MatLike
92+
9093CHECK_FPS_ITERATIONS = 10
9194
9295
@@ -1073,7 +1076,7 @@ def main():
10731076 QApplication .setStyle ("fusion" )
10741077 # Call to QApplication outside the try-except so we can show error messages
10751078 app = QApplication (sys .argv )
1076- try :
1079+ try : # noqa: PLW0717 # We really want to catch everything here
10771080 if sys .platform == "win32" :
10781081 myappid = f"Toufool.AutoSplit.v{ AUTOSPLIT_VERSION } "
10791082 shell32 .SetCurrentProcessExplicitAppUserModelID (myappid )
0 commit comments