Skip to content

[6.17.z] Fix ruff linting issues to prepare for version bump#1330

Merged
ogajduse merged 1 commit into6.17.zfrom
cherry-pick-6.17.z-4c2716f5aa1b119fcc7245393cb3dabb692ee506
Aug 11, 2025
Merged

[6.17.z] Fix ruff linting issues to prepare for version bump#1330
ogajduse merged 1 commit into6.17.zfrom
cherry-pick-6.17.z-4c2716f5aa1b119fcc7245393cb3dabb692ee506

Conversation

@Satellite-QE
Copy link
Contributor

Cherrypick of PR: #1328

Summary

  • Fix PLW1641: Add __hash__ method to Entity class
  • Fix PLC0206: Use .items() for dictionary iteration instead of iterating over keys
  • Apply Black formatting fixes for code style consistency

Test plan

  • All existing tests pass (272 tests)
  • ruff check passes with no errors
  • make test succeeds
  • pre-commit run -a passes all hooks (black, ruff, check yaml, debug statements)

This PR prepares the codebase for upcoming ruff version bump #1253 by addressing current linting issues while maintaining backward compatibility and test functionality. All pre-commit hooks now pass successfully.

🤖 Generated with Claude Code

* Fix ruff linting issues to prepare for version bump

- Add __hash__ method to Entity class (PLW1641)
- Fix dictionary iteration to use .items() (PLC0206)
- Add noqa comments for intentional mid-function imports (PLC0415)

All tests pass and ruff linting now succeeds with no errors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Apply pre-commit automated fixes

- Black formatting for nailgun/entities.py
- Ruff removed unnecessary noqa comments (PLC0415 no longer flagged)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update nailgun/entity_mixins.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 4c2716f)
@Satellite-QE Satellite-QE added 6.17.z Auto_Cherry_Picked GHA has automatically cherrypicked this PR No-CherryPick PR doesnt need CherryPick to previous branches labels Aug 11, 2025
@Satellite-QE Satellite-QE added the AutoMerge_Cherry_Picked Automatically merge the PR is PRT and all checks are passing label Aug 11, 2025
@ogajduse ogajduse enabled auto-merge (squash) August 11, 2025 15:23
@ogajduse ogajduse merged commit 13e67c9 into 6.17.z Aug 11, 2025
21 of 22 checks passed
@ogajduse ogajduse deleted the cherry-pick-6.17.z-4c2716f5aa1b119fcc7245393cb3dabb692ee506 branch August 11, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.17.z Auto_Cherry_Picked GHA has automatically cherrypicked this PR AutoMerge_Cherry_Picked Automatically merge the PR is PRT and all checks are passing No-CherryPick PR doesnt need CherryPick to previous branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants