-
Notifications
You must be signed in to change notification settings - Fork 5
Small refactor to fix SonarQube issues #17
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
Conversation
…functions for improved readability
WalkthroughThe changes refactor validation logic in the config module into separate methods, replace floating-point exact comparisons with tolerance-based checks using Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used🧬 Code graph analysis (2)src/cordon/cli.py (1)
src/cordon/core/config.py (1)
🪛 Ruff (0.14.8)src/cordon/core/config.py40-40: Avoid specifying long messages outside the exception class (TRY003) 42-42: Avoid specifying long messages outside the exception class (TRY003) 44-44: Avoid specifying long messages outside the exception class (TRY003) 46-46: Avoid specifying long messages outside the exception class (TRY003) 48-48: Avoid specifying long messages outside the exception class (TRY003) 50-50: Avoid specifying long messages outside the exception class (TRY003) 73-75: Avoid specifying long messages outside the exception class (TRY003) 81-81: Avoid specifying long messages outside the exception class (TRY003) 83-83: Avoid specifying long messages outside the exception class (TRY003) 85-85: Avoid specifying long messages outside the exception class (TRY003) 87-87: Avoid specifying long messages outside the exception class (TRY003) 94-94: Avoid specifying long messages outside the exception class (TRY003) 96-96: Avoid specifying long messages outside the exception class (TRY003) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
🔇 Additional comments (10)
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 |
|



Description
Addresses SonarQube code quality issues including cognitive complexity and floating-point comparison warnings. Also improves README organization.
Type of Change
Related Issues
Changes Made
README.md: Moved GPU Requirements from front matter to Performance section (it's optional, not a requirement)README.md: Centered title and badgesthresholder.py: Fixed floating-point equality comparisons usingisclose()cli.py: Reduced cognitive complexity by extracting_print_backend_info()and_print_filtering_mode()helperscli.py: Fixed floating-point equality comparisonconfig.py: Reduced cognitive complexity by extracting validation into_validate_core_params(),_validate_anomaly_range(),_validate_backend(), and_validate_llama_cpp_model_path()Testing
pytestand all tests passChecklist
pre-commit run --all-filesand fixed any issuesAdditional Notes
All changes are refactoring with no functional impact. Validation logic and behavior remain identical.
Summary by CodeRabbit
Documentation
Bug Fixes
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.