# Typing Exclusion Worker

Python typing exclusion worker: remove assigned mypy exclusion modules in small scoped...

- Repository: https://github.com/getsentry/skills (1107 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-26
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add getsentry/skills --skill typing-exclusion-worker -g -a claude-code -y`
Codex: `npx skills add getsentry/skills --skill typing-exclusion-worker -g -a codex -y`
Cursor: `npx skills add getsentry/skills --skill typing-exclusion-worker -g -a cursor -y`
Gemini CLI: `npx skills add getsentry/skills --skill typing-exclusion-worker -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add getsentry/skills`

## Description

Python typing exclusion worker: remove assigned mypy exclusion modules in small scoped batches, fix typing issues, run validation, and produce a structured completion summary. Use when running parallel typing-debt workers or when asked to remove modules from pyproject mypy exclusion overrides.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Typing Exclusion Worker

## Purpose

Execute one assigned typing batch safely and predictably:

- remove only assigned modules from mypy exclusions,
- fix surfaced typing issues in scope,
- run required checks,
- return a consistent summary for the manager/orchestrator.

## Inputs Required

Before starting, confirm these inputs exist in the task prompt:

- worktree/branch name,
- exact module list to remove from exclusion,
- ownership/domain boundary,
- expected validation commands (if customized).

If any are missing, ask for them before editing.

## Scope Rules (Hard Constraints)

1. Only remove assigned module entries from the mypy exclusion list in `pyproject.toml`.
2. Keep code changes in assigned scope unless a direct dependency is required to pass typing/tests.
3. Do not expand to cross-team modules unless explicitly approved by the manager.
4. Avoid blanket `# type: ignore`; if unavoidable, use narrow `ignore[code]` with a short reason.

## Execution Workflow

1. **Apply exclusion change**

   - Remove assigned modules from the exclusion override in `pyproject.toml`.

2. **Run mypy on assigned scope**

   - Prefer targeted paths first for fast feedback.
   - Fix errors using explicit typing patterns (`isinstance` narrowing, accurate return types, typed class attrs, relation-safe model access).

3. **Run tests for touched area**

   - Execute targeted pytest for modified modules/tests.
   - Fix regressions before continuing.

4. **Run pre-commit on changed files**

   - Run `pre-commit run --files <changed files>`.
   - If hooks auto-fix files, rerun until clean.

5. **Final verification**
   - Re-run targeted mypy and tests after final edits.
   - Ensure no unrelated files were changed.

## Python Typing Best Practices

The rest: https://github.com/getsentry/skills/blob/HEAD/skills/typing-exclusion-worker/SKILL.md
