Skip to content

Drop the Path Argument From the VS Code Tasks Snippet's Mypy Swaps #2157

Description

@ptr727

Problem

catalog/snippets/configs/vscode-tasks-python.json's header suggests a mypy swap that names a path, where CI names none for a project configured at its own root:

  • It swaps "Python Types" to uv run mypy src for a repo whose CI checker is mypy.
  • It gives uvx mypy src as the lint-only Scripts-profile form.

validate-task.yml's "Type check Python" step runs the checker with an empty targets array unless the config sits in another directory, so CI checks whatever [tool.mypy] files selects. A path argument overrides that selection, so the local task and CI check different file sets.

Constructed case: a root pyproject.toml with [tool.mypy] files = ["src", "tests"] and a type error in tests/test_x.py. uv run mypy src passes locally, and CI fails on the test file. With files unset, uv run mypy src passes while CI stops with mypy's missing-target error.

This is the same defect #1188 fixed in the pre-commit snippet's uvx mypy@latest . swap. #2025 covers the same uv run mypy src wording in python-codestyle, and this issue covers only the VS Code tasks snippet.

Done

The snippet's mypy swaps name no path argument, so a repo adopting them checks the file set CI checks. The header's "Adapt the target paths to the repo's package layout" line is reworded or dropped if it only existed to cover the src argument.

Found by the local strict review of the #1188 fix (handoff #2156).

Activity

  1. added
    documentationImprovements or additions to documentation
    pre-existingReview finding classed pre-existing per local-strict-review Disposing of Findings
    on Sep 30, 2026
  2. added a commit that references this issue on Oct 5, 2026
    cc809e2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationpre-existingReview finding classed pre-existing per local-strict-review Disposing of Findings

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions