Skip to content

Changes suggested by DJ Shortcut#91

Merged
AlanRockefeller merged 1 commit intomainfrom
dj-shortcut
May 5, 2026
Merged

Changes suggested by DJ Shortcut#91
AlanRockefeller merged 1 commit intomainfrom
dj-shortcut

Conversation

@AlanRockefeller
Copy link
Copy Markdown
Owner

@AlanRockefeller AlanRockefeller commented May 5, 2026

Tightened the backup-token regex so only hyphen-delimited trailing backups match, which prevents a bare backup.jpg stem from collapsing into an empty group key. (Pull # 87)

Updated pytest to use --basetemp=./tmp/pytest-temp and added tmp to norecursedirs in pyproject.toml:59 (pr # 73)

Keyboard modifier bindings now require all mapped bits to be present, allow extra event
modifiers, and choose the most specific matching binding before falling back to plain-key handling. (pr # 88)

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Improved how backup filename patterns are recognized for more accurate grouping and variant identification.
  • Tests

    • Added test coverage for edge case handling of plain backup filenames.

…ckups match, which prevents a bare backup.jpg stem from collapsing into an empty group key.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d1a9eccf-d065-4233-b6dc-bf8ce0063889

📥 Commits

Reviewing files that changed from the base of the PR and between 1e6d100 and d03909c.

📒 Files selected for processing (2)
  • faststack/io/variants.py
  • faststack/tests/test_variants_logic.py

Walkthrough

The PR refines the regex pattern used to detect trailing -backup tokens in filenames. The pattern now requires an explicit preceding dash rather than matching backup at the start of the string, affecting which files are classified as variants. A test case validates this corrected behavior.

Changes

Backup Token Parsing Refinement

Layer / File(s) Summary
Core Logic
faststack/io/variants.py
_BACKUP_TRAILING_RE pattern tightened from (?:^|-)backup$ to -backup$, requiring an explicit dash before the backup token.
Test Validation
faststack/tests/test_variants_logic.py
New test test_plain_backup_filename_is_not_variant verifies that a plain backup.jpg filename creates a "backup" group key rather than being treated as a variant, with main_path pointing to backup.jpg and backup_paths empty.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and generic, using non-descriptive phrasing that does not convey meaningful information about the actual changes made in the changeset. Replace with a specific, descriptive title that summarizes the main change, such as 'Tighten backup token regex and add backup filename test' or 'Fix backup regex matching and keyboard modifier binding behavior'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dj-shortcut

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 and usage tips.

@AlanRockefeller AlanRockefeller merged commit 4ed8457 into main May 5, 2026
3 checks passed
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