Skip to content

chore: improve type checking behavior#1470

Merged
WilliamBergamin merged 2 commits intomainfrom
improve-type-annotations
Mar 26, 2026
Merged

chore: improve type checking behavior#1470
WilliamBergamin merged 2 commits intomainfrom
improve-type-annotations

Conversation

@WilliamBergamin
Copy link
Contributor

Summary

These changes aim to include type checks that were previously ignored

Testing

CI should be sufficient

Category

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Document pages under /docs
  • Others

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run ./scripts/install_all_and_run_tests.sh after making the changes.

@codecov
Copy link

codecov bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.32%. Comparing base (f11dbfb) to head (6708724).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1470   +/-   ##
=======================================
  Coverage   91.31%   91.32%           
=======================================
  Files         229      229           
  Lines        7266     7270    +4     
=======================================
+ Hits         6635     6639    +4     
  Misses        631      631           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WilliamBergamin Another amazing changeset to maintenance 🐍 ✨

I left some question about CI scripts but nothing to block type checking changes from landing 🚢

Comment on lines +10 to +11
if TYPE_CHECKING:
from slack_bolt.app.async_app import AsyncApp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌟 praise: Love to find circular imports avoided without a sacrifice to sureness!

pip install -r requirements/async.txt
pip install -r requirements/adapter.txt
- name: Type check all modules
run: mypy --config-file pyproject.toml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📺 question: Are we wanting to split this from scripts moving forward?

👾 ramble: I find bash scripts can be most portable but these workflows seem to make use of ordered dependencies?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yess this aims to take advantage of ordered dependencies, ensuring that "synchronous" Bolt will never depend on "asynchronous" dependencies

I would like to keep the bash scripts in sync but I think this has some benefit to ensure we never accidentally depend on asynchronous dependencies

port: int
path: str
host: str
bolt_app: "AsyncApp" # type: ignore[name-defined]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🪓 praise: These comments have been confusing to me. Thanks for finding pattern of fixes!

@zimeg zimeg added this to the 1.28.0 milestone Mar 26, 2026
@WilliamBergamin WilliamBergamin merged commit 8908885 into main Mar 26, 2026
16 checks passed
@WilliamBergamin WilliamBergamin deleted the improve-type-annotations branch March 26, 2026 20:36
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.

2 participants