build: restore pylint to the quality checks - #294
Merged
Merged
Conversation
farhan
marked this pull request as draft
August 21, 2026 08:11
farhan
force-pushed
the
farhan/restore-pylint-289
branch
from
August 21, 2026 10:47
5efa33b to
23291e6
Compare
farhan
marked this pull request as ready for review
August 21, 2026 13:10
irfanuddinahmad
approved these changes
Aug 24, 2026
farhan
force-pushed
the
farhan/restore-pylint-289
branch
from
August 24, 2026 13:24
52f4df8 to
ee34323
Compare
kdmccormick
reviewed
Aug 27, 2026
kdmccormick
left a comment
Member
There was a problem hiding this comment.
thanks for the PR!
nit: do you mind changing the commit title to build: ... ? that way, if somebody squash-merges, we end up with the correct commit message title. The commit titles matter more now that we're using them as input to semantic releases.
farhan
force-pushed
the
farhan/restore-pylint-289
branch
4 times, most recently
from
August 31, 2026 13:41
6b7ead8 to
0b3f0c8
Compare
kdmccormick
requested changes
Sep 10, 2026
farhan
force-pushed
the
farhan/restore-pylint-289
branch
2 times, most recently
from
September 10, 2026 14:53
ef8a0c8 to
7d90b3b
Compare
Restores pylint to the quality gate alongside ruff. Ruff is not a drop-in replacement for pylint -- it does not run the edx_lint plugins or catch issues such as undefined attributes and type mismatches. Ruff owns style, imports, formatting, unused-import, and line-length; pylint provides the deeper static analysis. Ownership is split so no check runs in both tools: - unused-import (F401) -> ruff. It is auto-fixable, so pylint disables unused-import. Package __init__ re-exports use the `import X as X` idiom so ruff treats them as intentional re-exports (no F401) without Sphinx re-documenting them under -W; pylint's useless-import-alias is disabled as a false positive on this PEP 484 idiom. - line-length (E501 / C0301) -> ruff, so `ruff format --fix` can auto-fix long lines; pylint's C0301 is disabled. Also renames the Makefile `lint` target to `quality` and removes stale pylint useless-suppression comments. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
farhan
force-pushed
the
farhan/restore-pylint-289
branch
from
September 10, 2026 14:57
7d90b3b to
f3b718c
Compare
Contributor
Author
|
@kdmccormick |
kdmccormick
approved these changes
Sep 11, 2026
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.
Important
Generated with Claude, then manually reviewed (both this PR description and the code commits).
Related
Summary
Restores
pylintto the quality gate alongsideruff. Per #289, ruff is not a drop-in replacement for pylint — it does not run theedx_lintplugins and does not catch the class of issues (undefined attributes, type mismatches, etc.) that pylint does. Ruff stays responsible for style, imports, formatting, unused-import, and line-length; pylint is added back for the deeper static analysis.Ruff / pylint ownership
Each check is owned by exactly one tool, so nothing is enforced twice:
F401) → ruff. It's auto-fixable viaruff check --fix, so pylint disablesunused-import. The package__init__re-exports use the explicitimport X as Xalias idiom (PEP 484), which ruff recognizes as intentional re-exports (noF401). This idiom is used instead of__all__because Sphinx (built with-W) re-documents__all__re-exports under every import path, producing duplicate-object and ambiguous-cross-reference warnings that fail thedocscheck — the alias idiom is not re-documented by autodoc, sodocsstays green. pylint'suseless-import-alias(C0414) is disabled since it is a false positive on this deliberate re-export idiom.E501/C0301) → ruff. Ruff'sE501enforces the 120-char limit (itsignorelist no longer skipsE501); pylint'sline-too-long(C0301) is disabled so the limit is checked in only one place. Ruff can auto-fix most long lines viaruff format; the few it can't (e.g. long f-strings) are split manually.Everything else in ruff's
select(E,W,F,I,B,C4,UP,DJ) stays active. This keeps pylint on itsedx-lintdefaults and mirrors howedx-platformruns the two tools side by side.The change also renames the Makefile
linttarget toqualityand removes now-redundantlint-amnesty/pylint: disablesuppression comments (e.g.raise-missing-from,too-many-positional-arguments) that the restored config no longer flags.Testing
tox -e qualitypasses end to end (ruff check,ruff format --check,pylint xblocks_contrib xblock_pdf), andtox -e docsbuilds cleanly with warnings-as-errors (-W). CI already runsuv run toxwith bothqualityanddocsin the matrix, so they run there automatically — no workflow change needed.