From 90e54cd47f6964322b13701fffe461f386777350 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 13 Jun 2026 14:26:55 +0000 Subject: [PATCH] Narrow ruff lint scope to exclude vendored and upstream core trees 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. --- .github/workflows/sync-from-nns-core.yml | 2 +- pyproject.toml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync-from-nns-core.yml b/.github/workflows/sync-from-nns-core.yml index 809bd6b7..a9d68308 100644 --- a/.github/workflows/sync-from-nns-core.yml +++ b/.github/workflows/sync-from-nns-core.yml @@ -106,7 +106,7 @@ jobs: fi - name: Run ruff - run: ruff check . + run: ruff check . --exclude extern/NNS-core --exclude upstream - name: Run mypy run: mypy diff --git a/pyproject.toml b/pyproject.toml index 7d1b3376..09df3b3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,7 +79,11 @@ markers = [ [tool.ruff] line-length = 100 target-version = "py311" -extend-exclude = ["*.ipynb"] +extend-exclude = [ + "*.ipynb", + "extern/NNS-core", + "upstream", +] [tool.ruff.lint] select = ["E", "F", "I", "B", "UP", "N", "RUF", "TID"]