@@ -86,7 +86,7 @@ def build_async_required_kwargs(
8686 all_available_args [k ] = v
8787
8888 # Defer agent creation to avoid constructing AsyncBoltAgent on every request
89- if "agent" in required_arg_names or "args" in required_arg_names :
89+ if "agent" in required_arg_names :
9090 from slack_bolt .agent .async_agent import AsyncBoltAgent
9191
9292 all_available_args ["agent" ] = AsyncBoltAgent (
@@ -96,12 +96,11 @@ def build_async_required_kwargs(
9696 team_id = request .context .team_id ,
9797 user_id = request .context .user_id ,
9898 )
99- if "agent" in required_arg_names :
100- warnings .warn (
101- "The agent listener argument is experimental and may change in future versions." ,
102- category = ExperimentalWarning ,
103- stacklevel = 2 , # Point to the caller, not this internal helper
104- )
99+ warnings .warn (
100+ "The agent listener argument is experimental and may change in future versions." ,
101+ category = ExperimentalWarning ,
102+ stacklevel = 2 , # Point to the caller, not this internal helper
103+ )
105104
106105 if len (required_arg_names ) > 0 :
107106 # To support instance/class methods in a class for listeners/middleware,
0 commit comments