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 12, 2023
1 parent 78e2ce1 commit ff400cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions share/qtvcp/screens/qtplasmac/qtplasmac_handler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = '001.011'
VERSION = '001.012'
LCNCVER = '2.10'
DOCSVER = LCNCVER

Expand Down 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
5 changes: 5 additions & 0 deletions share/qtvcp/screens/qtplasmac/versions.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ <h2>QtPlasmaC Version History - LinuxCNC 2.10</h2>
</table>
<br>
<!--- ****** ADD NEXT VERSION BELOW THIS LINE ****** --->
<br><b><u>001.012 2023 Dec 12</u></b>
<ul style="margin:0;">
<li>fix invalid escape sequences</li>
</ul>

<br><b><u>001.011 2023 Nov 16</u></b>
<ul style="margin:0;">
<li>convert project to f strings</li>
Expand Down

0 comments on commit ff400cc

Please sign in to comment.