-
Notifications
You must be signed in to change notification settings - Fork 120
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
Filter/square brackets #849
Filter/square brackets #849
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #849 +/- ##
=====================================
Coverage 95.0% 95.0%
=====================================
Files 64 63 -1
Lines 6134 6158 +24
=====================================
+ Hits 5828 5851 +23
- Misses 306 307 +1 ☔ View full report in Codecov by Sentry. |
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.
Looks good to me, one small suggestion but good to merge either way.
pyam/str.py
Outdated
@@ -4,6 +4,8 @@ | |||
import pandas as pd | |||
from pandas.api.types import is_list_like | |||
|
|||
REGEXP_CHARACTERS = r".+()[]{}|$" |
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.
Not that I'd ever seen it but we can add the caret symbol as well ^
, especially since you have the dollar sign:
REGEXP_CHARACTERS = r".+()[]{}|$" | |
REGEXP_CHARACTERS = r".+()[]{}|$^" |
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.
Thanks for this comment - went through the list of regex-characters at https://docs.python.org/3/library/re.html and also added ?
...
Please confirm that this PR has done the following:
Documentation AddedName of contributors Added to AUTHORS.rstDescription in RELEASE_NOTES.md AddedDescription of PR
This PR fixes an issue where filtering by a string with square brackets is interpreted as regexp and doesn't work as expected.