You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
black --check has never been part of the effective CI quality gate on master, despite appearing to be.
Root Cause
The Makefile on master includes:
test-quality: test-lint test-codestyle test-mypy test-format
test-format:
black --check ${SRC_FILES}
And CI's quality tox env runs make test-quality. However, requirements/quality.txt (which the quality tox env installs from) does not include black. black is only present in requirements/ci.txt and requirements/dev.txt.
As a result, black --check cannot run in the quality tox env — formatting has silently been unenforced in CI.
This was discovered during the modernization PR #283. I removed test-format from test-quality in that PR to maintain parity with what master for now and let work on it with plan.
Proposed Fix
Replace black with ruff format, which is the standard formatter for modernized Open edX Python repos and is already part of the ruff linting toolchain. Specifically:
Summary
black --checkhas never been part of the effective CI quality gate onmaster, despite appearing to be.Root Cause
The
Makefileonmasterincludes:And CI's
qualitytox env runsmake test-quality. However,requirements/quality.txt(which thequalitytox env installs from) does not includeblack.blackis only present inrequirements/ci.txtandrequirements/dev.txt.As a result,
black --checkcannot run in the quality tox env — formatting has silently been unenforced in CI.This was discovered during the modernization PR #283. I removed
test-formatfromtest-qualityin that PR to maintain parity with what master for now and let work on it with plan.Proposed Fix
Replace
blackwithruff format, which is the standard formatter for modernized Open edX Python repos and is already part of therufflinting toolchain. Specifically:rufftorequirements/quality.in(or thequalitydependency group inpyproject.tomlafter build: modernize forum repo to use uv, pyproject.toml, and semantic-release #283)test-formattarget:test-format: ruff format --check ${SRC_FILES}test-formatintest-qualityso formatting is actually enforcedblackfrom all requirements filesruff formatis Black-compatible by design and handles imports cleanly, satisfying the same formatting contract without the dependency overhead.Related