Skip to content

fix(ci): run mypy on all example files not just top-level in projects - #167

Merged
zimeg merged 1 commit into
mainfrom
fix/mypy-recurse-all-files
Aug 4, 2026
Merged

fix(ci): run mypy on all example files not just top-level in projects#167
zimeg merged 1 commit into
mainfrom
fix/mypy-recurse-all-files

Conversation

@zimeg

@zimeg zimeg commented Aug 4, 2026

Copy link
Copy Markdown
Member

Problem

The test workflow's type-check step is mypy ./**/*.py. But ** only recurses when the shell has globstar enabled — and it is not enabled in the non-interactive shell GitHub Actions uses. So ./**/*.py expands to only the two top-level files (src/__init__.py, tests/__init__.py), and mypy silently skips every example under src/blocks/ and the nested tests.

You can see it in any recent run's log:

Success: no issues found in 2 source files

2 files — while the collection has many more (block-kit has 32 .py files). Type errors in the actual examples would pass CI unnoticed.

Fix

-          mypy ./**/*.py
+          mypy .

mypy . walks the directory tree itself rather than relying on shell globbing, so it checks every file regardless of globstar.

Verification

Ran mypy . per collection (the matrix runs the step in each showcase dir):

collection files checked (before → after) result
block-kit 2 → 32 clean
ai/slackbot-mcp-client/no-auth 2 → 5 clean
ai/slackbot-mcp-client/rich-responses/mcp-apps 2 → 5 clean
ai/slackbot-mcp-client/slack-identity 2 → 5 clean

All collections still pass — main is type-clean; CI just wasn't actually checking it.

🤖 Generated with Claude Code

The test workflow ran `mypy ./**/*.py`, but `**` only recurses when the
shell has `globstar` enabled — which it is NOT in the non-interactive
shell CI uses. So `./**/*.py` expanded to just the two top-level files
(`src/__init__.py`, `tests/__init__.py`) and mypy silently skipped every
example under `src/blocks/` (and nested tests). CI reported
'no issues found in 2 source files' while type-checking none of the
actual examples.

Use `mypy .` so mypy walks the tree itself instead of relying on shell
globbing. Coverage goes from 2 files to all of them (e.g. block-kit:
2 -> 32); still passes on all collections.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg
zimeg requested a review from a team as a code owner August 4, 2026 23:24
@zimeg zimeg added the github_actions Pull requests that update GitHub Actions code label Aug 4, 2026
@zimeg zimeg self-assigned this Aug 4, 2026
@zimeg zimeg added the bug Something isn't working label Aug 4, 2026
@zimeg zimeg changed the title fix(ci): run mypy on all files, not just top-level fix(ci): run mypy on all example files not just top-level in projects Aug 4, 2026
@zimeg
zimeg merged commit e49e9d4 into main Aug 4, 2026
6 checks passed
@zimeg
zimeg deleted the fix/mypy-recurse-all-files branch August 4, 2026 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant