fix: Correct FileHash.compare to compare FileHash objects#13012
fix: Correct FileHash.compare to compare FileHash objects#13012andy-cave-nf wants to merge 2 commits into
Conversation
|
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @andy-cave-nf |
Additional Artifact Review RequiredChanges to artifact directory files requires at least 2 approvals from core team members. |
There was a problem hiding this comment.
Gates Failed
Enforce advisory code health rules
(1 file with Code Duplication)
Gates Passed
3 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| test_base_resource.py | 1 advisory rule | 10.00 → 9.39 | Suppress |
Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Contributes to #8269
Problem
Hiya, first time contributing. I wanted to improve the unit test coverage and as I was adding to FileHash I noticed a bug in FileHash.compare. It compares FileHash objects with strings rather than other FileHash objects.
Solution
I've correct the comparison to be against FileHash objects rather than against the checksum attribute, which is a string.
I've also added extra tests to bring that file up to 100% coverage.
Checklist