Repository navigation
Conversation
…egex checks Signed-off-by: mercael <mercael91@gmail.com>
…egex checks Signed-off-by: mercael <mercael91@gmail.com>
…egex checks Signed-off-by: mercael <mercael91@gmail.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…cols - regex9: the combined year/month/day assertion stays one predicate (the issue requires predicates unchanged) and now carries a message naming expected parts and actual values. - regex9/regex10: messages wrapped to the 80-column limit from CONTRIBUTING.md, same style as the other regex checks. - drop the duplicate-pattern regression test: the checks themselves are the assertions, and precedent in checks/ commits adds no tests.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #94
What changed
Both files listed in the issue now report actionable messages on the 8 bare
assertions, and nothing else in the curriculum is touched:
checks/regex/regex9.py— the two bare assertions get messages. The combinedyear/month/dayassertion stays one predicate (the issue's "predicatesunchanged" criterion); only its message was added, naming the expected parts and
the actual ones.
checks/regex/regex10.py— the six baregroup(...)assertions get messageswith expected and actual values.
Messages are wrapped the way the other regex checks do it (
regex8.py), so everyline stays inside the 80-column limit from CONTRIBUTING.md. The single long line
that remains (
regex10.py:4, 98 chars) is unchanged fromdev.Nothing else moved: assertion counts are the same as
dev(regex9: 6, regex10: 12),predicates, ordering, side effects and
printoutput are untouched, and the codestays Python 3.9 compatible (f-strings with
!ronly).Verification
regex9 ✓/regex10 ✓.value, e.g.
date parts should be ('1999', '12', '31'), got ('WRONG', 'WRONG', 'WRONG')and
m2.group('level') should be 'WARNING', got 'WRONG'.awk 'length>80'over both files reports no new long lines (before: 9 lines overthe limit; now only the pre-existing
regex10.py:4).Note
This covers all 8 assertions the issue lists. It supersedes #145, which was closed
due to inactivity and only touched
regex9.py.