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

Use raw string for regex #452

Merged
merged 2 commits into from
Mar 4, 2025
Merged

Use raw string for regex #452

merged 2 commits into from
Mar 4, 2025

Conversation

lochhh
Copy link
Collaborator

@lochhh lochhh commented Feb 28, 2025

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
With Python 3.12 we're getting the following SyntaxWarning, which will eventually become a SyntaxError:

tests\test_unit\test_validators\test_files_validators.py:97
SyntaxWarning: invalid escape sequence '\d'
"The provided frame regexp ((0\d*).\w+$) did not return "

What does this PR do?
This PR updates the affected test to use raw string for regex.

How has this PR been tested?

Tests pass locally without emitting SyntaxWarning.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

Copy link

codecov bot commented Feb 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.86%. Comparing base (822a10f) to head (04fcff5).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #452   +/-   ##
=======================================
  Coverage   99.86%   99.86%           
=======================================
  Files          27       27           
  Lines        1462     1462           
=======================================
  Hits         1460     1460           
  Misses          2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lochhh lochhh marked this pull request as ready for review February 28, 2025 16:48
@lochhh lochhh requested a review from a team March 3, 2025 19:12
Copy link

sonarqubecloud bot commented Mar 3, 2025

Copy link
Contributor

@sfmig sfmig left a comment

Choose a reason for hiding this comment

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

thanks @lochhh! ✨

@sfmig sfmig enabled auto-merge March 4, 2025 10:08
@niksirbi niksirbi disabled auto-merge March 4, 2025 11:04
@niksirbi
Copy link
Member

niksirbi commented Mar 4, 2025

I will use my admin perks to force-merge this. GitHub's CI hangup hasn't been resolved yet for some reason (it still tries to run CI on runners we've already removed).

@niksirbi niksirbi merged commit 46dbecf into main Mar 4, 2025
26 checks passed
@niksirbi niksirbi deleted the regex-syntax branch March 4, 2025 11:05
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.

3 participants