Skip to content

Commit

Permalink
Fix SyntaxWarning: invalid escape sequence '\{'
Browse files Browse the repository at this point in the history
 Fixes the following syntax warning on python 3.12:

 /usr/share/qtvcp/screens/qtplasmac_4x3/qtplasmac_4x3_handler.py:4016:
  SyntaxWarning: invalid escape sequence '\{'
   commands = f"{data[1]}\{data[3]}"
 /usr/share/qtvcp/screens/qtplasmac_4x3/qtplasmac_4x3_handler.py:4804:
  SyntaxWarning: invalid escape sequence '\{'
   msgs = f'{msg0}.\n\n\{msg1}:'

Signed-off-by: Damian Wrobel <[email protected]>
  • Loading branch information
dwrobel committed Dec 11, 2023
1 parent cac8b1b commit 262bad2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions share/qtvcp/screens/qtplasmac/qtplasmac_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4013,7 +4013,7 @@ def user_button_setup(self):
checked = True
self.dualCodeButtons[bNum] = [data[1], data[2], data[3], bLabel, checked]
# dualCodeButtons format is: code1 ;; label1 ;; code2 ;; label2 ;; checked
commands = f"{data[1]}\{data[3]}"
commands = f"{data[1]}\\{data[3]}"
else:
commands = bCode
for command in commands.split('\\'):
Expand Down Expand Up @@ -4801,7 +4801,7 @@ def delete_material_clicked(self):
except:
if not matNum:
msg0 = _translate('HandlerClass', 'A material number is required')
msgs = f'{msg0}.\n\n\{msg1}:'
msgs = f'{msg0}.\n\n\\{msg1}:'
else:
msg0 = _translate('HandlerClass', 'is not a valid number')
msgs = f'{matNum} {msg0}.\n\n{msg1}:'
Expand Down

0 comments on commit 262bad2

Please sign in to comment.