Skip to content

Commit d8caf9e

Browse files
authored
Fix B028 (#194)
1 parent 5fcf7ab commit d8caf9e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/error_messages.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def split_image_directory_empty():
5757

5858
def image_type(image: str):
5959
set_text_message(
60-
f'"{image}" is not a valid image file, does not exist, '
60+
f"{image!r} is not a valid image file, does not exist, "
6161
+ "or the full image file path contains a special character.",
6262
)
6363

@@ -89,11 +89,11 @@ def alignment_not_matched():
8989

9090

9191
def no_keyword_image(keyword: str):
92-
set_text_message(f'Your split image folder does not contain an image with the keyword "{keyword}".')
92+
set_text_message(f"Your split image folder does not contain an image with the keyword {keyword!r}.")
9393

9494

9595
def multiple_keyword_images(keyword: str):
96-
set_text_message(f'Only one image with the keyword "{keyword}" is allowed.')
96+
set_text_message(f"Only one image with the keyword {keyword!r} is allowed.")
9797

9898

9999
def reset_hotkey():
@@ -111,7 +111,7 @@ def invalid_settings():
111111

112112

113113
def invalid_hotkey(hotkey_name: str):
114-
set_text_message(f'Invalid hotkey "{hotkey_name}"')
114+
set_text_message(f"Invalid hotkey {hotkey_name!r}")
115115

116116

117117
def no_settings_file_on_open():

src/hotkeys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def send_command(autosplit: AutoSplit, command: Commands):
6666
_send_hotkey(autosplit.settings_dict["undo_split_hotkey"])
6767

6868
else:
69-
raise KeyError(f"'{command}' is not a valid LiveSplit.AutoSplitIntegration command")
69+
raise KeyError(f"{command!r} is not a valid LiveSplit.AutoSplitIntegration command")
7070

7171

7272
def _unhook(hotkey_callback: Callable[[], None] | None):

src/user_profile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def __load_settings_from_file(autosplit: AutoSplit, load_settings_file_path: str
148148
if not autosplit.capture_method.check_selected_region_exists(autosplit):
149149
autosplit.live_image.setText(
150150
"Reload settings after opening"
151-
+ f'\n"{autosplit.settings_dict["captured_window_title"]}"'
151+
+ f"\n{autosplit.settings_dict['captured_window_title']!r}"
152152
+ "\nto automatically load Capture Region",
153153
)
154154

0 commit comments

Comments
 (0)