Skip to content

Commit

Permalink
Fix #901 by correcting type hints for files_upload method args
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Jan 5, 2021
1 parent 646932c commit 81d38fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion slack_sdk/web/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,7 @@ async def files_sharedPublicURL(self, *, file: str, **kwargs) -> AsyncSlackRespo
return await self.api_call("files.sharedPublicURL", json=kwargs)

async def files_upload(
self, *, file: Union[str, IOBase] = None, content: str = None, **kwargs
self, *, file: Union[str, bytes, IOBase] = None, content: str = None, **kwargs
) -> AsyncSlackResponse:
"""Uploads or creates a file.
Expand Down
2 changes: 1 addition & 1 deletion slack_sdk/web/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,7 @@ def files_sharedPublicURL(self, *, file: str, **kwargs) -> SlackResponse:
return self.api_call("files.sharedPublicURL", json=kwargs)

def files_upload(
self, *, file: Union[str, IOBase] = None, content: str = None, **kwargs
self, *, file: Union[str, bytes, IOBase] = None, content: str = None, **kwargs
) -> SlackResponse:
"""Uploads or creates a file.
Expand Down
2 changes: 1 addition & 1 deletion slack_sdk/web/legacy_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,7 @@ def files_sharedPublicURL(
return self.api_call("files.sharedPublicURL", json=kwargs)

def files_upload(
self, *, file: Union[str, IOBase] = None, content: str = None, **kwargs
self, *, file: Union[str, bytes, IOBase] = None, content: str = None, **kwargs
) -> Union[Future, SlackResponse]:
"""Uploads or creates a file.
Expand Down

0 comments on commit 81d38fd

Please sign in to comment.