[CI] Add three pre-commit pygrep hooks - #12933
Conversation
https://github.com/pre-commit/pygrep-hooks Official hooks from pre-commit some more basic checks or tests we can run
|
@blueorangutan package |
|
@jbampton a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12933 +/- ##
============================================
+ Coverage 3.41% 19.65% +16.23%
- Complexity 0 19791 +19791
============================================
Files 487 6368 +5881
Lines 41867 574889 +533022
Branches 7912 70353 +62441
============================================
+ Hits 1429 112973 +111544
- Misses 40238 449643 +409405
- Partials 200 12273 +12073
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17311 |
There was a problem hiding this comment.
Pull request overview
Adds additional upstream pygrep-hooks checks to the repository’s pre-commit configuration to catch a few common Python/text pitfalls earlier in CI and local developer workflows.
Changes:
- Add
python-check-mock-methodsto detect common invalidunittest.mockmethod usages. - Add
python-use-type-annotationsto discourage PEP 484 type comments in favor of annotations (with a targeted exclude). - Add
text-unicode-replacement-charto forbid UTF-8 replacement characters in committed files.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
https://github.com/pre-commit/pygrep-hooks
Official hooks from pre-commit some more basic checks or tests we can run
Description
This PR...
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?