Skip to content

feat(methods): add chat.postMessage example (typecheck-only)#132

Draft
zimeg wants to merge 3 commits into
mainfrom
methods-typecheck-only
Draft

feat(methods): add chat.postMessage example (typecheck-only)#132
zimeg wants to merge 3 commits into
mainfrom
methods-typecheck-only

Conversation

@zimeg

@zimeg zimeg commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

This pull request adds a methods/ chat.postMessage example verified by ruff + mypy only — no runtime test.

  • slack_sdk's chat_postMessage has typed keyword arguments, so mypy catches wrong types, missing required args, and misspelled arguments (e.g. chnnel → "Missing named argument channel") without a mock server.
  • Ruff handles lint/format.
  • No tests/ directory, no mock HTTP server.

Comparison PR. This is an alternative to the mock-server runtime-test approach (see PR #131) for side-by-side evaluation of testing strategy across the example repos.

Testing

  • Run the example end-to-end: export SLACK_TOKEN="xoxb-..." then python -m src.chat.chat_post_message from methods/; confirm the message posts.

🤖 Generated with Claude Code

zimeg and others added 3 commits July 14, 2026 16:47
Add a methods/ chat.postMessage example verified by ruff + mypy, with no
runtime test. slack_sdk's chat_postMessage has typed keyword arguments, so
mypy catches wrong types, missing required args, and misspelled arguments
(e.g. chnnel -> "Missing named argument channel") without a mock server.

This is an alternative to the mock-server runtime-test approach for
side-by-side comparison.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Add methods to the CI matrix and treat pytest exit code 5 ("no tests
collected") as success, so the type-check-only methods example (which has
no tests) passes CI while still running ruff and mypy. Real test failures
(exit 1) still fail the build.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Match the runtime branch: add a chat manifest.json requesting only
chat:write, move the scope out of the README into the manifest, and use the
method's exact docs description.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant