Skip to content

Narrow ruff lint scope to exclude vendored and upstream core trees - #6

Merged
OVVO-Financial merged 1 commit into
mainfrom
claude/serene-goodall-dx2o3d
Jun 13, 2026
Merged

Narrow ruff lint scope to exclude vendored and upstream core trees#6
OVVO-Financial merged 1 commit into
mainfrom
claude/serene-goodall-dx2o3d

Conversation

@OVVO-Financial

Copy link
Copy Markdown
Owner

Problem

The sync-from-nns-core workflow runs ruff check ., which lints the vendored
core snapshot and the temporary upstream checkout:

extern/NNS-core/...
upstream/NNS-core/...

That incorrectly applies NNS-python lint rules to code that is a core source
snapshot or a transient CI artifact — e.g. TID251 (subprocess banned) in core
fidelity scripts and style issues in vendored core scripts. These are not
NNS-python package-implementation failures, and it caused the
Sync from NNS-core run (nns-core-updated dispatch on main) to fail at the
ruff step.

Fix

  • pyproject.toml: add extern/NNS-core and upstream to [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-python ruff;
they are core source snapshots and temporary checkout artifacts.

The extend-exclude change also covers the inspect-r-api-update workflow's
ruff check . (which checks out upstream/NNS).

Validation

git diff --check                                          # clean
ruff check . --exclude extern/NNS-core --exclude upstream # All checks passed!
ruff check .                                              # All checks passed!

Confirmed ruff lints 0 files under extern/NNS-core or upstream/ after the change.

https://claude.ai/code/session_017KnASettwNxUdYJzchRLux


Generated by Claude Code

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.
@OVVO-Financial
OVVO-Financial merged commit 4242ec7 into main Jun 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants