Add black and ruff to fix lint/pep/ and other issues automatically#634
Merged
otc-zuul[bot] merged 3 commits intomainfrom Mar 3, 2026
Merged
Add black and ruff to fix lint/pep/ and other issues automatically#634otc-zuul[bot] merged 3 commits intomainfrom
otc-zuul[bot] merged 3 commits intomainfrom
Conversation
anton-sidelnikov
approved these changes
Mar 3, 2026
Contributor
|
Build succeeded. ✔️ test-release SUCCESS in 3m 46s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR modernizes and stabilizes the linting and formatting pipeline while keeping OpenStack standards.
What Was Done
Integrated Ruff for:
E,F,Irules)Integrated Black as the canonical code formatter (default line length = 88)
Kept flake8 + hacking to enforce OpenStack-specific standards
Kept doc8 for documentation validation
Updated
toxconfiguration:pep8environment → CI check-only (no file modifications)fix-pep8environment → local auto-fix (modifies files)Disabled
E501andE203in flake8 to avoid conflicts with Black formatting (as recommended by Black documentation)Why to much files changed
The large diff is intentional.
Black reformatted the entire codebase to a consistent style:
Ruff additionally:
No functional or behavioral changes were introduced.
All changes are formatting and lint normalization only.
Why This Is Beneficial
CI Behavior
CI now runs linting in read-only mode.
If formatting is incorrect, CI fails without modifying files.
Impact