Skip to content

Commit 609c5a4

Browse files
progress
1 parent b43b886 commit 609c5a4

File tree

29 files changed

+155
-154
lines changed

29 files changed

+155
-154
lines changed

requirements/testing.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ psutil>=6.0.0,<7
1616
boto3<=2
1717
# For AWS tests
1818
moto>=4.0.13,<6
19-
mypy==1.11.1
19+
mypy==1.13.0

slack_sdk/audit_logs/v1/async_client.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
Refer to https://slack.dev/python-slack-sdk/audit-logs/ for details.
44
"""
5+
56
import json
67
import logging
78
from ssl import SSLContext
@@ -252,7 +253,7 @@ async def _perform_http_request(
252253
retry_request = RetryHttpRequest(
253254
method=http_verb,
254255
url=url,
255-
headers=headers,
256+
headers=headers, # type: ignore[arg-type]
256257
body_params=body_params,
257258
)
258259

@@ -278,19 +279,19 @@ async def _perform_http_request(
278279
)
279280

280281
try:
281-
async with session.request(http_verb, url, **request_kwargs) as res:
282+
async with session.request(http_verb, url, **request_kwargs) as res: # type: ignore[arg-type]
282283
try:
283284
response_body = await res.text()
284285
retry_response = RetryHttpResponse(
285286
status_code=res.status,
286-
headers=res.headers,
287+
headers=res.headers, # type: ignore[arg-type]
287288
data=response_body.encode("utf-8") if response_body is not None else None,
288289
)
289290
except aiohttp.ContentTypeError:
290291
self.logger.debug(f"No response data returned from the following API call: {url}.")
291292
retry_response = RetryHttpResponse(
292293
status_code=res.status,
293-
headers=res.headers,
294+
headers=res.headers, # type: ignore[arg-type]
294295
)
295296
except json.decoder.JSONDecodeError as e:
296297
message = f"Failed to parse the response body: {str(e)}"
@@ -320,7 +321,7 @@ async def _perform_http_request(
320321
url=url,
321322
status_code=res.status,
322323
raw_body=response_body,
323-
headers=res.headers,
324+
headers=res.headers, # type: ignore[arg-type]
324325
)
325326
_debug_log_response(self.logger, resp)
326327
return resp
@@ -355,6 +356,6 @@ async def _perform_http_request(
355356

356357
finally:
357358
if not use_running_session:
358-
await session.close()
359+
await session.close() # type: ignore[union-attr]
359360

360361
return resp

slack_sdk/audit_logs/v1/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def _perform_http_request_internal(self, url: str, req: Request) -> AuditLogsRes
356356
url=url,
357357
status_code=http_resp.status,
358358
raw_body=response_body,
359-
headers=http_resp.headers,
359+
headers=http_resp.headers, # type: ignore[arg-type]
360360
)
361361
_debug_log_response(self.logger, resp)
362362
return resp

slack_sdk/audit_logs/v1/logs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ def __init__(
804804
self.attributes = []
805805
for a in attributes:
806806
if isinstance(a, dict):
807-
self.attributes.append(Attribute(**a))
807+
self.attributes.append(Attribute(**a)) # type: ignore[arg-type]
808808
else:
809809
self.attributes.append(a)
810810
self.channel = channel
@@ -824,9 +824,9 @@ def __init__(
824824
self.rules_checked = []
825825
for a in rules_checked:
826826
if isinstance(a, dict):
827-
self.rules_checked.append(AAARule(**a))
827+
self.rules_checked.append(AAARule(**a)) # type: ignore[arg-type]
828828
else:
829-
self.rules_checked.append(a)
829+
self.rules_checked.append(a) # type: ignore[arg-type]
830830
self.disconnecting_team = disconnecting_team
831831
self.is_channel_canvas = is_channel_canvas
832832
self.linked_channel_id = linked_channel_id
@@ -1021,7 +1021,7 @@ def __init__(
10211021
class WorkflowV2StepConfiguration:
10221022
name: Optional[str]
10231023
step_function_type: Optional[str]
1024-
step_function_app_id: Optional[int]
1024+
step_function_app_id: Optional[str]
10251025
unknown_fields: Dict[str, Any]
10261026

10271027
def __init__(

slack_sdk/http_retry/request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def __init__(
2929
@classmethod
3030
def from_urllib_http_request(cls, req: Request) -> "HttpRequest":
3131
return HttpRequest(
32-
method=req.method,
32+
method=req.method, # type: ignore[arg-type]
3333
url=req.full_url,
3434
headers={k: v if isinstance(v, list) else [v] for k, v in req.headers.items()},
35-
data=req.data,
35+
data=req.data, # type: ignore[arg-type]
3636
)

slack_sdk/models/blocks/basic_components.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,13 +285,13 @@ def to_dict(self, option_type: str = "block") -> Dict[str, Any]: # skipcq: PYL-
285285
elif option_type == "action" or option_type == "attachment":
286286
# "action" can be confusing but it means a legacy message action in attachments
287287
# we don't remove the type name for backward compatibility though
288-
json = {"text": self.label, "value": self.value}
288+
json: Dict[str, Any] = {"text": self.label, "value": self.value}
289289
if self.description is not None:
290290
json["description"] = self.description
291291
return json
292292
else: # if option_type == "block"; this should be the most common case
293-
text: TextObject = self._text or PlainTextObject.from_str(self.label)
294-
json: Dict[str, Any] = {
293+
text: TextObject = self._text or PlainTextObject.from_str(self.label) # type: ignore[arg-type]
294+
json = {
295295
"text": text.to_dict(),
296296
"value": self.value,
297297
}
@@ -343,7 +343,7 @@ def __init__(
343343
options: A list of no more than 100 Option objects.
344344
""" # noqa prevent flake8 blowing up on the long URL
345345
# default_type=PlainTextObject.type is for backward-compatibility
346-
self._label: Optional[TextObject] = TextObject.parse(label, default_type=PlainTextObject.type)
346+
self._label: Optional[TextObject] = TextObject.parse(label, default_type=PlainTextObject.type) # type: ignore[arg-type]
347347
self.label: Optional[str] = self._label.text if self._label else None
348348
self.options = Option.parse_all(options) # compatible with version 2.5
349349
show_unknown_key_warning(self, others)

0 commit comments

Comments
 (0)