Skip to content

Fix #94 - #159

Open
mercael91 wants to merge 4 commits into
abhiksark:devfrom
mercael91:fix/issue-94-v2
Open

mercael91 wants to merge 4 commits into
abhiksark:devfrom
mercael91:fix/issue-94-v2

Conversation

@mercael91

@mercael91 mercael91 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

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 combined
    year/month/day assertion stays one predicate (the issue's "predicates
    unchanged" criterion); only its message was added, naming the expected parts and
    the actual ones.
  • checks/regex/regex10.py — the six bare group(...) assertions get messages
    with expected and actual values.

Messages are wrapped the way the other regex checks do it (regex8.py), so every
line stays inside the 80-column limit from CONTRIBUTING.md. The single long line
that remains (regex10.py:4, 98 chars) is unchanged from dev.

Nothing else moved: assertion counts are the same as dev (regex9: 6, regex10: 12),
predicates, ordering, side effects and print output are untouched, and the code
stays Python 3.9 compatible (f-strings with !r only).

Verification

  • Both checks run against the reference answers and print regex9 ✓ / regex10 ✓.
  • With a deliberately wrong match, the new messages fire and name the expected
    value, e.g.
    date parts should be ('1999', '12', '31'), got ('WRONG', 'WRONG', 'WRONG')
    and m2.group('level') should be 'WARNING', got 'WRONG'.
  • The AST probe from the issue reports 0 bare assertions in the two listed files.
  • awk 'length>80' over both files reports no new long lines (before: 9 lines over
    the limit; now only the pre-existing regex10.py:4).
  • CI: all 8 matrix jobs green (ubuntu 3.9–3.13, macos 3.13, windows 3.9/3.13).

Note

This covers all 8 assertions the issue lists. It supersedes #145, which was closed
due to inactivity and only touched regex9.py.

…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>
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4207b6d6-8529-4961-96bf-6d0b1a02f74f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…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

No deployments
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