Skip to content

Commit a4eaf27

Browse files
committed
FIx a type issue by simplifying loop
1 parent d9c5e3b commit a4eaf27

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/user_profile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import error_messages
1414
from capture_method import CAPTURE_METHODS, CaptureMethodEnum, Region, change_capture_method
15-
from hotkeys import HOTKEYS, CommandStr, Hotkey, remove_all_hotkeys, set_hotkey
15+
from hotkeys import HOTKEYS, CommandStr, remove_all_hotkeys, set_hotkey
1616
from menu_bar import open_settings
1717
from utils import auto_split_directory
1818

@@ -157,11 +157,11 @@ def __load_settings_from_file(autosplit: AutoSplit, load_settings_file_path: str
157157

158158
remove_all_hotkeys()
159159
if not autosplit.is_auto_controlled:
160-
for hotkey, hotkey_name in ((hotkey, f"{hotkey}_hotkey") for hotkey in HOTKEYS):
160+
for hotkey in HOTKEYS:
161+
hotkey_name = f"{hotkey}_hotkey"
161162
hotkey_value = autosplit.settings_dict.get(hotkey_name)
162163
if hotkey_value:
163-
# cast caused by a regression in pyright 1.1.365
164-
set_hotkey(autosplit, cast(Hotkey, hotkey), hotkey_value)
164+
set_hotkey(autosplit, hotkey, hotkey_value)
165165

166166
change_capture_method(
167167
cast(CaptureMethodEnum, autosplit.settings_dict["capture_method"]),

0 commit comments

Comments
 (0)