10000 Fix typing for schedule_extract_refresh by jorwoods · Pull Request #1022 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

Fix typing for schedule_extract_refresh #1022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tableauserverclient/server/endpoint/datasources_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
if TYPE_CHECKING:
from ..server import Server
from ...models import PermissionsRule
from .schedules_endpoint import AddResponse

FilePath = Union[str, os.PathLike]
FileObject = Union[io.BufferedReader, io.BytesIO]
Expand Down Expand Up @@ -480,5 +481,7 @@ def delete_revision(self, datasource_id: str, revision_number: str) -> None:

# a convenience method
@api(version="2.8")
def schedule_extract_refresh(self, schedule_id: int, item: DatasourceItem) -> None: # actually should return a task
def schedule_extract_refresh(
self, schedule_id: str, item: DatasourceItem
) -> List["AddResponse"]: # actually should return a task
return self.parent_srv.schedules.add_to_schedule(schedule_id, datasource=item)
5 changes: 4 additions & 1 deletion tableauserverclient/server/endpoint/flows_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from .. import DQWItem
from ..request_options import RequestOptions
from ...models.permissions_item import PermissionsRule
from .schedules_endpoint import AddResponse


FilePath = Union[str, os.PathLike]
Expand Down Expand Up @@ -240,5 +241,7 @@ def delete_dqw(self, item: FlowItem) -> None:

# a convenience method
@api(version="3.3")
def schedule_flow_run(self, schedule_id: int, item: FlowItem) -> None: # actually should return a task
def schedule_flow_run(
self, schedule_id: str, item: FlowItem
) -> List["AddResponse"]: # actually should return a task
return self.parent_srv.schedules.add_to_schedule(schedule_id, flow=item)
5 changes: 4 additions & 1 deletion tableauserverclient/server/endpoint/workbooks_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from ..request_options import RequestOptions
from .. import DatasourceItem
from ...models.connection_credentials import ConnectionCredentials
from .schedules_endpoint import AddResponse

# The maximum size of a file that can be published in a single request is 64MB
FILESIZE_LIMIT = 1024 * 1024 * 64 # 64MB
Expand Down Expand Up @@ -532,5 +533,7 @@ def delete_revision(self, workbook_id: str, revision_number: str) -> None:

# a convenience method
@api(version="2.8")
def schedule_extract_refresh(self, schedule_id: int, item: WorkbookItem) -> None: # actually should return a task
def schedule_extract_refresh(
self, schedule_id: str, item: WorkbookItem
) -> List["AddResponse"]: # actually should return a task
return self.parent_srv.schedules.add_to_schedule(schedule_id, workbook=item)
0