From 9fbdb4fbf163d19303c82c892737fea9433d29ac Mon Sep 17 00:00:00 2001 From: Helmut Hoffer von Ankershoffen Date: Sat, 25 Apr 2026 11:01:52 +0200 Subject: [PATCH] chore(ci): exclude .claude/worktrees from pyright + gitignore [PYSDK-103] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pyright was recursing into local Claude Code agent worktree dirs at `.claude/worktrees//` and reporting type errors from the nested codegen output, causing `make lint` to fail in working trees that have an in-flight Claude Code background session. Worktrees are per-developer ephemeral state, not source code. Two-line fix: - pyrightconfig.json: add `**/.claude/worktrees/**` to exclude - .gitignore: add `.claude/worktrees/` (belt-and-braces; without this a `git add -A` could accidentally scoop the worktree dir into a commit) Note: .claude/settings.json is intentionally tracked (it carries the aignostics/claude-plugins qms plugin pin from PYSDK-96 / #582); the gitignore entry is narrow (`/worktrees/` only) and does not affect that file. Supersedes PYSDK-102, which was a retroactive CR opened on PR #590 (closed unmerged). #590's branch and commit message did not contain the PYSDK key — CC-SOP-01 requires the key in both for the Jira GitHub App auto-link and smart-commit transitions to work. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 4 ++++ pyrightconfig.json | 1 + 2 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index bfb3e1b9d..a53a652d5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,9 @@ # .gitignore of project Aignostics Python SDK +# Claude Code agent worktrees — created locally per session, never committed. +# Note: .claude/settings.json is intentionally tracked; only worktrees are ignored. +.claude/worktrees/ + # Environment .env .env.* diff --git a/pyrightconfig.json b/pyrightconfig.json index 612b268a0..b6a233da8 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -3,6 +3,7 @@ "exclude": [ "**/.nox/**", "**/.venv/**", + "**/.claude/worktrees/**", "**/dist-packages/**", "**/dist_vercel/.vercel/**", "**/dist_native/**",