File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,8 @@ async def handle_mention(agent):
207207 `AsyncBoltAgent` instance
208208 """
209209 if "agent" not in self :
210+ # Deferred import: AsyncBoltAgent is only imported at runtime when accessed,
211+ # avoiding unnecessary loading when the agent property is never used.
210212 from slack_bolt .agent .async_agent import AsyncBoltAgent
211213
212214 self ["agent" ] = AsyncBoltAgent (
Original file line number Diff line number Diff line change @@ -208,6 +208,8 @@ def handle_mention(agent):
208208 `BoltAgent` instance
209209 """
210210 if "agent" not in self :
211+ # Deferred import: BoltAgent is only imported at runtime when accessed,
212+ # avoiding unnecessary loading when the agent property is never used.
211213 from slack_bolt .agent .agent import BoltAgent
212214
213215 self ["agent" ] = BoltAgent (
You can’t perform that action at this time.
0 commit comments