Skip to content

fix: add missing lazy parameter to listener method type hints#1469

Open
quicksilversel wants to merge 2 commits intoslackapi:mainfrom
quicksilversel:fix/add-lazy-param-type-hints
Open

fix: add missing lazy parameter to listener method type hints#1469
quicksilversel wants to merge 2 commits intoslackapi:mainfrom
quicksilversel:fix/add-lazy-param-type-hints

Conversation

@quicksilversel
Copy link

Summary

  • Adds the lazy parameter to the type signatures of all 18 listener registration methods (event, message, command, action, shortcut, view, options, function, and their variants) in both App and AsyncApp
  • No runtime behavior changes — the parameter was already handled via **kwargs in the inner __call__ functions; this fix surfaces it in the type signatures for mypy and IDE autocompletion

Fixes #1412

Category

  • slack_bolt.App and its core components
  • slack_bolt.AsyncApp and its core components
  • Adapters in slack_bolt.adapter
  • Documentation
  • Others

Test plan

  • ./scripts/format.sh passes
  • ./scripts/lint.sh passes
  • ./scripts/run_mypy.sh passes
  • ./scripts/run_tests.sh tests/scenario_tests/test_app.py passes

Adds the `lazy` parameter to the type signatures of all 18 listener
registration methods in both `App` and `AsyncApp`. The parameter was
already handled at runtime via **kwargs but was missing from the method
signatures, causing mypy errors when users passed lazy=[...].

No runtime behavior changes.

Fixes slackapi#1412
@quicksilversel quicksilversel requested a review from a team as a code owner March 23, 2026 01:33
@salesforce-cla
Copy link

Thanks for the contribution! Before we can merge this, we need @quicksilversel to sign the Salesforce Inc. Contributor License Agreement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lazy parameter missing from type hints for event(), message(), etc.

1 participant