Skip to content

Commit 3ff6e93

Browse files
fix mypy issues
1 parent 0fd98fd commit 3ff6e93

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

slack_bolt/adapter/falcon/async_resource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async def on_get(self, req: Request, resp: Response):
4242

4343
resp.status = "404"
4444
# Falcon 4.x w/ mypy fails to correctly infer the str type here
45-
resp.body = "The page is not found..." # type: ignore[assignment]
45+
resp.body = "The page is not found..."
4646

4747
async def on_post(self, req: Request, resp: Response):
4848
bolt_req = await self._to_bolt_request(req)

slack_bolt/adapter/falcon/resource.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def on_get(self, req: Request, resp: Response):
3636

3737
resp.status = "404"
3838
# Falcon 4.x w/ mypy fails to correctly infer the str type here
39-
resp.body = "The page is not found..." # type: ignore[assignment]
39+
resp.body = "The page is not found..."
4040

4141
def on_post(self, req: Request, resp: Response):
4242
bolt_req = self._to_bolt_request(req)
@@ -53,7 +53,7 @@ def _to_bolt_request(self, req: Request) -> BoltRequest:
5353
def _write_response(self, bolt_resp: BoltResponse, resp: Response):
5454
if falcon_version.__version__.startswith("2."):
5555
# Falcon 4.x w/ mypy fails to correctly infer the str type here
56-
resp.body = bolt_resp.body # type: ignore[assignment]
56+
resp.body = bolt_resp.body
5757
else:
5858
resp.text = bolt_resp.body
5959

slack_bolt/app/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ def _register_listener(
14481448
CustomListener(
14491449
app_name=self.name,
14501450
ack_function=functions.pop(0),
1451-
lazy_functions=functions,
1451+
lazy_functions=functions, # type:ignore[arg-type]
14521452
matchers=listener_matchers,
14531453
middleware=listener_middleware,
14541454
auto_acknowledgement=auto_acknowledgement,

slack_bolt/app/async_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,7 @@ def _register_listener(
14871487
AsyncCustomListener(
14881488
app_name=self.name,
14891489
ack_function=functions.pop(0),
1490-
lazy_functions=functions,
1490+
lazy_functions=functions, # type:ignore[arg-type]
14911491
matchers=listener_matchers,
14921492
middleware=listener_middleware,
14931493
auto_acknowledgement=auto_acknowledgement,

0 commit comments

Comments
 (0)