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

Make regex strings raw strings #232

Merged
merged 1 commit into from
Jun 18, 2024
Merged

Make regex strings raw strings #232

merged 1 commit into from
Jun 18, 2024

Conversation

StijnKas
Copy link
Collaborator

I was running into warnings on our regexes:

[/Users/kass1/Documents/pdstools/.venv/lib/python3.12/site-packages/pdstools/adm/ADMDatamart.py:1301](https://file+.vscode-resource.vscode-cdn.net/Users/kass1/Documents/pdstools/.venv/lib/python3.12/site-packages/pdstools/adm/ADMDatamart.py:1301): SyntaxWarning: invalid escape sequence '\-'
  return pl.col(x).str.replace_all("[ \-_]", "").str.to_uppercase()
[/Users/kass1/Documents/pdstools/.venv/lib/python3.12/site-packages/pdstools/pega_io/File.py:339](https://file+.vscode-resource.vscode-cdn.net/Users/kass1/Documents/pdstools/.venv/lib/python3.12/site-packages/pdstools/pega_io/File.py:339): SyntaxWarning: invalid escape sequence '\d'
  return fromPRPCDateTime(re.search("\d.*GMT", x)[0].replace("_", " "))

Fixed this by turning these strings into raw strings

Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.59%. Comparing base (d6cc0c5) to head (5f1e122).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #232   +/-   ##
=======================================
  Coverage   59.59%   59.59%           
=======================================
  Files          29       29           
  Lines        3789     3789           
=======================================
  Hits         2258     2258           
  Misses       1531     1531           

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

@StijnKas StijnKas merged commit 8cc9e6a into master Jun 18, 2024
13 checks passed
@StijnKas StijnKas deleted the regex_strings branch June 18, 2024 15:07
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.

1 participant