Stabilize Black/Isort CI format validation [AARD-2117]#1303
Merged
BrandonPacewic merged 2 commits intodevfrom Apr 3, 2026
Merged
Stabilize Black/Isort CI format validation [AARD-2117]#1303BrandonPacewic merged 2 commits intodevfrom
[AARD-2117]#1303BrandonPacewic merged 2 commits intodevfrom
Conversation
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.
Task
AARD-2117
Symptom
The
BlackFormat.ymlCI job fails intermittently on PRs with no Python changes. Two causes:psf/black@stable, which always resolves to the latest black release. Any new version with updated formatting rules immediately breaks CI againstpreviously passing code.
verifyIsortFormatting.pyvalidated formatting by actually modifying files on disk and diffing the result. Because it was invoked from the repo root, thepyproject.tomlskip patternsfor
src/Protoandproto/proto_outdid not resolve reliably, causing isort to reformat auto-generated proto files and produce false positive failures.Additionally,
blackandisortwere unpinned inrequirements-dev.txt, meaning developer environments and CI could silently diverge.Solution
psf/black@stableaction with a directpython3 -m black --checkinvocation with an explicit--configflag, ensuring config discovery is deterministic regardless ofworking directory.
isort --check-only --diff --settings-path, delegating comparison logic to isort itself and eliminating the disk-write side effect.black==24.10.0andisort==5.13.2inrequirements-dev.txt.requirements-dev.txtdirectly, making it the single source of truth for formatter versions.Verification
python3 -m black --check --config ./exporter/SynthesisFusionAddin/pyproject.toml ./exporter/SynthesisFusionAddin/locally, all 40 files pass unchanged.verifyIsortFormatting.pylocally, all tracked Python files pass;src/Protofiles are correctly skipped.Before merging, ensure the following criteria are met: