- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 560
Update pre-commit config #2548
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
Update pre-commit config #2548
Conversation
| Summary by CodeRabbit
 Summary by CodeRabbit
 WalkthroughThe updates remove Bandit security scanning from both the pre-commit configuration and the project settings. Ruff linter configuration is adjusted to include security checks and to ignore them in test files. The Ruff pre-commit hook is renamed, and configuration for per-file ignores is updated for clarity and scope. Additionally, type annotations and explanatory comments were removed from the Malaysia holiday module without changing functionality. Changes
 Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure  ✨ Finishing Touches🧪 Generate Unit Tests
 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit: 
 SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
 Other keywords and placeholders
 Documentation and Community
 | 
| Codecov ReportAll modified and coverable lines are covered by tests ✅ 
 Additional details and impacted files@@            Coverage Diff            @@
##               dev     #2548   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          216       216           
  Lines        13739     13737    -2     
  Branches      1942      1942           
=========================================
- Hits         13739     13737    -2     ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
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.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (2)
- .pre-commit-config.yaml(1 hunks)
- pyproject.toml(1 hunks)
⏰ Context from checks skipped due to timeout of 300000ms (1)
- GitHub Check: Test build on windows-latest
🔇 Additional comments (1)
pyproject.toml (1)
70-70: Enable Ruff security checks by including “S” codes
Adding the “S” category toselectensures Ruff will pick up the Bandit‐style security rules viaflake8-bandit. This aligns perfectly with the goal of replacing the old Bandit hook.
bandit with ruff.lint.flake8-banditThere 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.
LGTM - great work on test suite consolidation 👍
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.
Actionable comments posted: 1
♻️ Duplicate comments (1)
pyproject.toml (1)
72-72: Rename toper-file-ignores.Switching from
extend-per-file-ignoresto the documentedper-file-ignoresformat is correct and aligns with Ruff’s latest configuration style.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
- pyproject.toml(1 hunks)
🔇 Additional comments (1)
pyproject.toml (1)
70-70: Include security checks in Ruffselect.Adding
"S"to theselectlist ensures Ruff continues to enforce security rules now that Bandit is removed.
| 
 | 
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.
Actionable comments posted: 1
♻️ Duplicate comments (1)
pyproject.toml (1)
72-72: Rename per-file-ignores as intended
The switch fromextend-per-file-ignorestoper-file-ignorescorrectly follows Ruff’s configuration conventions.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
- pyproject.toml(1 hunks)
⏰ Context from checks skipped due to timeout of 300000ms (1)
- GitHub Check: Test build on windows-latest
🔇 Additional comments (1)
pyproject.toml (1)
70-70: Include security rule codes in Ruff linting
Adding"S"to theselectlist ensures Ruff will check security-related rules via the flake8-bandit integration. This aligns with replacing the Bandit hook in pre-commit.
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.
LGTM 👍
Co-authored-by: Arkadii Yakovets <[email protected]>
Co-authored-by: Arkadii Yakovets <[email protected]>



Proposed change
Update pre-commit config:
bandithook with flake8-banditmypyadditional dependenciesType of change
holidaysfunctionality in general)Checklist
make check, all checks and tests are green