Skip to content

Commit

Permalink
Fix edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamBergamin committed Dec 20, 2024
1 parent 46159d5 commit 9ba8e07
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions slack_sdk/web/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3857,8 +3857,8 @@ async def files_upload_v2(
thread_ts=thread_ts,
**kwargs,
)
if len(completion.get("files")) == 1: # type: ignore[arg-type]
completion.data["file"] = completion.get("files")[0] # type: ignore[index]
if len(completion.get("files")) == 1: # type: ignore[arg-type, union-attr, unused-ignore]
completion.data["file"] = completion.get("files")[0] # type: ignore[index, union-attr, unused-ignore]

Check warning on line 3861 in slack_sdk/web/async_client.py

View check run for this annotation

Codecov / codecov/patch

slack_sdk/web/async_client.py#L3860-L3861

Added lines #L3860 - L3861 were not covered by tests
return completion

async def files_getUploadURLExternal(
Expand Down
4 changes: 2 additions & 2 deletions slack_sdk/web/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3848,8 +3848,8 @@ def files_upload_v2(
thread_ts=thread_ts,
**kwargs,
)
if len(completion.get("files")) == 1: # type: ignore[arg-type]
completion.data["file"] = completion.get("files")[0] # type: ignore[index]
if len(completion.get("files")) == 1: # type: ignore[arg-type, union-attr, unused-ignore]
completion.data["file"] = completion.get("files")[0] # type: ignore[index, union-attr, unused-ignore]

Check warning on line 3852 in slack_sdk/web/client.py

View check run for this annotation

Codecov / codecov/patch

slack_sdk/web/client.py#L3851-L3852

Added lines #L3851 - L3852 were not covered by tests
return completion

def files_getUploadURLExternal(
Expand Down
4 changes: 2 additions & 2 deletions slack_sdk/web/legacy_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3859,8 +3859,8 @@ def files_upload_v2(
thread_ts=thread_ts,
**kwargs,
)
if len(completion.get("files")) == 1: # type: ignore[arg-type]
completion.data["file"] = completion.get("files")[0] # type: ignore[index]
if len(completion.get("files")) == 1: # type: ignore[arg-type, union-attr, unused-ignore]
completion.data["file"] = completion.get("files")[0] # type: ignore[index, union-attr, unused-ignore]

Check warning on line 3863 in slack_sdk/web/legacy_client.py

View check run for this annotation

Codecov / codecov/patch

slack_sdk/web/legacy_client.py#L3862-L3863

Added lines #L3862 - L3863 were not covered by tests
return completion

def files_getUploadURLExternal(
Expand Down

0 comments on commit 9ba8e07

Please sign in to comment.