Skip to content
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 (Python 3.12) #450

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elboulangero
Copy link

.pybuild/cpython3_3.12_pacu/build/tests/test_pacu_data_command.py::test_parse_data_command_returns_help
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pacu/build/pacu/modules/iam__backdoor_users_password/main.py:129: SyntaxWarning: invalid escape sequence '\]'
    symbols = '!@#$%^&*()_+=-\][{}|;:",./?><`~'

.pybuild/cpython3_3.12_pacu/build/tests/test_pacu_data_command.py::test_parse_data_command_returns_help
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pacu/build/pacu/modules/systemsmanager__rce_ec2/main.py:85: SyntaxWarning: invalid escape sequence '\s'
    '[\s\S]*Windows[\s\S]*Server[\s\S]*',

.pybuild/cpython3_3.12_pacu/build/tests/test_pacu_data_command.py::test_parse_data_command_returns_help
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pacu/build/pacu/modules/systemsmanager__rce_ec2/main.py:86: SyntaxWarning: invalid escape sequence '\s'
    '[\s\S]*Amazon[\s\S]*Linux[\s\S]*',

.pybuild/cpython3_3.12_pacu/build/tests/test_pacu_data_command.py::test_parse_data_command_returns_help
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pacu/build/pacu/modules/systemsmanager__rce_ec2/main.py:87: SyntaxWarning: invalid escape sequence '\s'
    '[\s\S]*Ubuntu[\s\S]*Server[\s\S]*16\\.04[\s\S]*',

.pybuild/cpython3_3.12_pacu/build/tests/test_pacu_data_command.py::test_parse_data_command_returns_help
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pacu/build/pacu/modules/systemsmanager__rce_ec2/main.py:88: SyntaxWarning: invalid escape sequence '\s'
    '[\s\S]*Ubuntu[\s\S]*Server[\s\S]*18\\.04[\s\S]*',

```
.pybuild/cpython3_3.12_pacu/build/tests/test_pacu_data_command.py::test_parse_data_command_returns_help
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pacu/build/pacu/modules/iam__backdoor_users_password/main.py:129: SyntaxWarning: invalid escape sequence '\]'
    symbols = '!@#$%^&*()_+=-\][{}|;:",./?><`~'

.pybuild/cpython3_3.12_pacu/build/tests/test_pacu_data_command.py::test_parse_data_command_returns_help
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pacu/build/pacu/modules/systemsmanager__rce_ec2/main.py:85: SyntaxWarning: invalid escape sequence '\s'
    '[\s\S]*Windows[\s\S]*Server[\s\S]*',

.pybuild/cpython3_3.12_pacu/build/tests/test_pacu_data_command.py::test_parse_data_command_returns_help
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pacu/build/pacu/modules/systemsmanager__rce_ec2/main.py:86: SyntaxWarning: invalid escape sequence '\s'
    '[\s\S]*Amazon[\s\S]*Linux[\s\S]*',

.pybuild/cpython3_3.12_pacu/build/tests/test_pacu_data_command.py::test_parse_data_command_returns_help
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pacu/build/pacu/modules/systemsmanager__rce_ec2/main.py:87: SyntaxWarning: invalid escape sequence '\s'
    '[\s\S]*Ubuntu[\s\S]*Server[\s\S]*16\\.04[\s\S]*',

.pybuild/cpython3_3.12_pacu/build/tests/test_pacu_data_command.py::test_parse_data_command_returns_help
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pacu/build/pacu/modules/systemsmanager__rce_ec2/main.py:88: SyntaxWarning: invalid escape sequence '\s'
    '[\s\S]*Ubuntu[\s\S]*Server[\s\S]*18\\.04[\s\S]*',
```
Copy link
Contributor

@j0eblow j0eblow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, thank you, lgtm.

note: adding the r before the string, making it a raw string (r'...'), is considered good practice, especially when working with strings that include special characters like backslashes (). This ensures Python interprets the backslashes literally rather than as escape characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants