From 2ebf19e5e1d0923c7f057ba047e57654dcc05ade Mon Sep 17 00:00:00 2001 From: Jeremiah Lowin <153965+jlowin@users.noreply.github.com> Date: Sat, 18 Jul 2026 20:58:24 -0400 Subject: [PATCH] Make examples/ actually trigger the ty gate (#4541) #4466 added examples/ to [tool.ty.src] include, but two filters still excluded it: the ty prek hook's files: scope and the static-analysis workflow's push path triggers. An examples-only commit or direct push to main could skip the gate entirely. --- .github/workflows/run-static.yml | 1 + .pre-commit-config.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-static.yml b/.github/workflows/run-static.yml index 66ddb5c1b..8297ef413 100644 --- a/.github/workflows/run-static.yml +++ b/.github/workflows/run-static.yml @@ -10,6 +10,7 @@ on: - "fastmcp_slim/**" - "fastmcp_remote/**" - "tests/**" + - "examples/**" - "pyproject.toml" - "uv.lock" - ".github/workflows/**" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 304c3e463..8321b5bde 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: entry: uv run --isolated ty check language: system types: [python] - files: ^fastmcp_slim/|^tests/ + files: ^fastmcp_slim/|^tests/|^examples/ pass_filenames: false require_serial: true