Enable more ruff rules - #7470
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7470 +/- ##
=======================================
Coverage 80.62% 80.62%
=======================================
Files 580 580
Lines 46754 46754
=======================================
Hits 37691 37691
Misses 9063 9063 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (15)
🚧 Files skipped from review as they are similar to previous changes (10)
📝 WalkthroughWalkthroughThis PR narrows Ruff ignores, adds targeted ChangesLint cleanup and warning compliance
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/schedulers/test_slurm.py`:
- Around line 59-61: Update the ValueError match pattern in the SlurmJobResource
test to use a single escaped asterisk in the raw regex, so it matches the
literal “*” in the error message rather than backslashes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5be77c4f-4616-4935-a97b-bd1e076c56ad
📒 Files selected for processing (35)
.molecule/default/files/polish/lib/expression.pypyproject.tomlsrc/aiida/engine/processes/calcjobs/calcjob.pysrc/aiida/engine/processes/workchains/restart.pysrc/aiida/orm/nodes/data/array/bands.pysrc/aiida/orm/utils/node.pysrc/aiida/restapi/resources.pysrc/aiida/storage/sqlite_zip/orm.pysrc/aiida/tools/dbimporters/plugins/icsd.pysrc/aiida/transports/plugins/async_backend.pytests/cmdline/params/types/test_calculation.pytests/cmdline/params/types/test_code.pytests/cmdline/params/types/test_group.pytests/cmdline/utils/test_common.pytests/conftest.pytests/engine/daemon/test_client.pytests/engine/processes/test_control.pytests/engine/test_run.pytests/engine/test_runners.pytests/engine/test_work_chain.pytests/manage/configuration/test_config.pytests/orm/data/code/test_abstract.pytests/orm/data/code/test_containerized.pytests/orm/data/code/test_installed.pytests/orm/data/code/test_portable.pytests/orm/models/test_models.pytests/orm/nodes/data/test_array.pytests/orm/nodes/data/test_data.pytests/orm/nodes/data/test_jsonable.pytests/orm/nodes/data/test_remote.pytests/orm/nodes/data/test_trajectory.pytests/schedulers/test_slurm.pytests/test_conftest.pytests/tools/archive/migration/test_v06_to_v07.pytests/transports/test_all_plugins.py
This is a follow-up to the recent ruff upgrades, where I purposefully disabled some rules that had a lot of hits to ease review.
Here I enable three more rules and fix (or add noqas) all the hits
RUFF043
RUF059 (unused-unpacked-variable)
PLR0911 (too-many-return-statements)