-
-
Notifications
You must be signed in to change notification settings - Fork 12
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 #86 -- Add support for an optional regex dependency #85
Conversation
Adding a regex example to find line-length issues of any non-comment part of the code.
Fix typo.
upgrade from re to regex to support more features.
upgrade to regex from re
Fixing unicode issues
Hi @yangcht, Thank you for contributing to relint. I always love to see how people use this package. Would you be so kind and split the cookbook suggestions and the new dependency into two pull-requests? Furthermore, I'd love to keep regex as an optional dependency. So maybe wrap it in a try block and add it to the package extras. Since we don't actually ship any linting rules, having a separate dependency is not needed in all cases. Please reach out to me if you require any assistance with that. Best! |
Hi @codingjoe , Thanks for the nice suggestions! I have splitter the PR. I issued another PR for the cookbook change and made this PR only about the usage of the |
Hi @codingjoe, I have made the changs for the code plus some tests. Please have a look. Thanks! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #85 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 149 153 +4
=========================================
+ Hits 149 153 +4 ☔ 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.
Hi @yangcht,
Thank you for your contribution. I had this lightly different in mind. Installing dependencies without a user's knowledge is dangerous. Besides, pip doesn't need to be installed on the system, so the command would fail.
Anyhow, I took the liberty to amend a couple of commits and to update the CI suite to test with regex installed.
Please let me know if this works for you, and I will merge and release this patch.
Best,
Joe
Hi @codingjoe, Thanks for the commits. I agree with your points. I just tested the new version, and it works well. Cheers, |
Adding a regex example to find line-length issues of any non-comment part of the code.