build: restore pylint to the quality checks - #294
Open
farhan wants to merge 2 commits into
Open
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
3 times, most recently
from
August 31, 2026 13:39
25b6d6d to
6b7ead8
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, and unused-import; 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 are declared with __all__ so ruff treats them as intentional re-exports (no F401). - line-length (E501 / C0301) -> pylint. Ruff ignores E501; pylint's C0301 enforces the 120-char limit. Also renames the Makefile `lint` target to `quality`, removes stale pylint useless-suppression comments, and wraps one over-length line. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
farhan
force-pushed
the
farhan/restore-pylint-289
branch
from
August 31, 2026 13:41
6b7ead8 to
0b3f0c8
Compare
Adding __all__ to the package __init__ files made Sphinx (run with -W) document ProblemBlock and safe_exec at several import paths, producing duplicate-object and ambiguous-cross-reference warnings that failed the docs check. Revert those re-exports to the `import X as X` idiom, which marks the intentional re-export for ruff without being re-documented by autodoc, and disable pylint's useless-import-alias (a false positive on this PEP 484 idiom) so the quality check stays green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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, and unused-import; 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) → pylint. Ruff ignoresE501; pylint'sC0301enforces the 120-char limit (including trailing comments).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.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.