Skip to content

Change regex definitions to use raw strings #285

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

Conversation

jonasbardino
Copy link
Contributor

@jonasbardino jonasbardino commented Jul 18, 2025

Change regex definitions to use raw strings in order to avoid e.g. pylint throwing SyntaxError due to invalid escape sequences like '\.' which should either be written as '\\.' or r'\.' instead.

Please refer to https://docs.python.org/3/howto/regex.html for further details.

We already have implicit unit tests to cover this change as the regex raw strings are used e.g. in the migerrors cronjob, which is automatically generated and checked against the constant fixture version in tests/test_mig_shared_install.py.

@jonasbardino jonasbardino self-assigned this Jul 18, 2025
@jonasbardino jonasbardino added the bug Something isn't working label Jul 18, 2025
@jonasbardino jonasbardino requested a review from a team July 18, 2025 09:19
…lint

throwing `SyntaxError` due to invalid escape sequences like `'\.'` which should
either be written as `'\\.'` or `r'\.'` instead.
Please refer to https://docs.python.org/3/howto/regex.html for further details.
@jonasbardino jonasbardino force-pushed the adjust/shared-defaults-regexes-to-use-raw-strings-to-avoid-syntaxerror branch from cb1ce0a to 70e9eb5 Compare July 22, 2025 12:58
@jonasbardino jonasbardino merged commit 6511bfd into next Jul 22, 2025
7 checks passed
@jonasbardino jonasbardino deleted the adjust/shared-defaults-regexes-to-use-raw-strings-to-avoid-syntaxerror branch July 22, 2025 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant