-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SyntaxWarning: invalid escape sequence '\{' #2777
Fix SyntaxWarning: invalid escape sequence '\{' #2777
Conversation
@@ -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}:' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msgs = f'{msg0}.\n\n\\{msg1}:' | |
msgs = f'{msg0}.\n\n{msg1}:' |
Could this also have been the author's intention? I have no idea how these commands should look like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this also have been the author's intention?
I would prefer not to guess rather wait for the author to comment.
For sure the current version is wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this also have been the author's intention? I have no idea how these commands should look like.
Yes, this was a fairly long standing typo, thanks for noticing; hansu's version is correct:
msgs = f'{msg0}.\n\n{msg1}:'
I agree with the change to line 4016, and hansu's changes as noted. Please make sure to update the version at line 1, and then update the version.html file in the same folder. |
262bad2
to
0f48d6c
Compare
Thanks for making the changes. Not to be pedantic, but can you fix the date on this line, and then I'm happy to merge it:
|
0f48d6c
to
ff400cc
Compare
Fixed. |
I'm sorry, I didnt notice you changed line 4016 as well. It was correct in your first commit. It should be:
Only the line Hansu pointed out needed changed. |
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]>
ff400cc
to
44b91df
Compare
Original version restored. |
Thank you! As soon as the checks finish, I will merge this one. |
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}:'