Narrow ruff lint scope to exclude vendored and upstream core trees - #6
Merged
Conversation
The sync-from-nns-core workflow ran `ruff check .`, which linted the vendored core snapshot (extern/NNS-core) and the temporary upstream checkout (upstream/NNS-core). That applied NNS-python lint rules (e.g. TID251 subprocess ban, style) to code that is a core source snapshot or transient CI artifact, not NNS-python package implementation. - pyproject.toml: add extern/NNS-core and upstream to ruff extend-exclude - sync-from-nns-core.yml: make the ruff step explicit with --exclude flags Vendored/upstream trees are not modified to satisfy NNS-python ruff.
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.
Problem
The
sync-from-nns-coreworkflow runsruff check ., which lints the vendoredcore snapshot and the temporary upstream checkout:
That incorrectly applies
NNS-pythonlint rules to code that is a core sourcesnapshot or a transient CI artifact — e.g.
TID251(subprocess banned) in corefidelity scripts and style issues in vendored core scripts. These are not
NNS-pythonpackage-implementation failures, and it caused theSync from NNS-corerun (nns-core-updateddispatch onmain) to fail at theruff step.
Fix
pyproject.toml: addextern/NNS-coreandupstreamto[tool.ruff] extend-exclude..github/workflows/sync-from-nns-core.yml: make the ruff step explicit —ruff check . --exclude extern/NNS-core --exclude upstream.Vendored / upstream trees are not modified to satisfy
NNS-pythonruff;they are core source snapshots and temporary checkout artifacts.
The
extend-excludechange also covers theinspect-r-api-updateworkflow'sruff check .(which checks outupstream/NNS).Validation
Confirmed ruff lints 0 files under
extern/NNS-coreorupstream/after the change.https://claude.ai/code/session_017KnASettwNxUdYJzchRLux
Generated by Claude Code