Skip to content

fix(rules): narrow the 'when' mapping so mypy accepts it (CI unbreak) - #256

Merged
CryptoJones merged 1 commit into
mainfrom
fix-rules-mypy
Aug 15, 2026
Merged

fix(rules): narrow the 'when' mapping so mypy accepts it (CI unbreak)#256
CryptoJones merged 1 commit into
mainfrom
fix-rules-mypy

Conversation

@CryptoJones

Copy link
Copy Markdown
Owner

main's CI has been red since a64fa91: mypy rejects rules.py:120-121 because data.get("when") is called twice and the isinstance ternary doesn't narrow. Bind it once; no behavior change.

Validation: mypy src clean (49 files), ruff check clean, full suite 972 passed / 1 skipped.

Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/

🤖 Generated with Claude Code

https://claude.ai/code/session_01XRHMqf9JLj1P6Gbb9XpFsh

data.get("when") called twice defeats mypy's isinstance narrowing —
bind it once. No behavior change. Unbreaks the mypy step that has been
failing CI on main since a64fa91.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XRHMqf9JLj1P6Gbb9XpFsh
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1bd74d23-c961-4e03-ab52-ced4c8f98077


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.

@CryptoJones
CryptoJones merged commit 065a282 into main Aug 15, 2026
16 checks passed
@CryptoJones
CryptoJones deleted the fix-rules-mypy branch August 15, 2026 14:07
CryptoJones added a commit that referenced this pull request Aug 15, 2026
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