Repository navigation
refactor: the Python code passes its own linter in strict mode - #14
Merged
Merged
Conversation
The 120 CUP-I008 warnings are resolved. 52 in the code itself: the helper functions of the compiler Filters and of three visitors are now methods of their class, the export pipeline is a named Pipeline, and three small decisions are tables. 68 with a comment that gives the reason, on code that is plain by design: a primitive itself, a visitor of a syntax tree, the entry of a program, a test harness. 13 more comments are on the conformance judge and speed check, which the repository self-check also covers. CI runs the invariant linter with --strict. The self-check test pins the number of comments, so a new one is a change that someone sees. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 13, 2026
JoshuaWink
added this pull request to stack #17
October 13, 2026 18:59
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.
What
The Python code of this repository had 120 warnings from its own rule CUP-I008 (logic that is not in a primitive). This change resolves all of them, and CI now runs the invariant linter with
--strict.How each one was resolved
52 in the code itself
Pipeline. It is now a named Pipeline,ExportPipeline.build_export_pipeline_v2stays, and returns one.lint_pathsfunctions always putexclude,disableandstrictin the first Payload. Before, each was added by anif.68 with a comment that gives the reason
These are plain by design, and each has
# cup: allow-plain <reason>:Payload,Pipeline,label_of)scorecard/)13 more comments are on
conformance/run.pyandconformance/bench.py(the judge and the speed check). They are not in the lint paths ofcup.config.json, but the repository self-check covers them.What keeps it this way
python -m codeupipe_lint.invariants --strict. A new warning fails the run.tests/lint/invariants/test_repo_is_clean.pynow expects no finding and no warning. It also pins the number ofallow-plaincomments (81). A new comment changes that number, so a reviewer sees it.Checks
Not in this change
🤖 Generated with Claude Code