Skip to content

Commit

Permalink
correct version of black
Browse files Browse the repository at this point in the history
  • Loading branch information
jacalata committed Sep 30, 2024
1 parent 84e42af commit 5ef3602
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
6 changes: 4 additions & 2 deletions tableauserverclient/server/pager.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@

@runtime_checkable
class Endpoint(Protocol[T]):
def get(self, req_options: Optional[RequestOptions]) -> Tuple[List[T], PaginationItem]: ...
def get(self, req_options: Optional[RequestOptions]) -> Tuple[List[T], PaginationItem]:
...


@runtime_checkable
class CallableEndpoint(Protocol[T]):
def __call__(self, __req_options: Optional[RequestOptions], **kwargs) -> Tuple[List[T], PaginationItem]: ...
def __call__(self, __req_options: Optional[RequestOptions], **kwargs) -> Tuple[List[T], PaginationItem]:
...


class Pager(Iterable[T]):
Expand Down
6 changes: 4 additions & 2 deletions tableauserverclient/server/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ def __iter__(self: Self) -> Iterator[T]:
return

@overload
def __getitem__(self: Self, k: Slice) -> List[T]: ...
def __getitem__(self: Self, k: Slice) -> List[T]:
...

@overload
def __getitem__(self: Self, k: int) -> T: ...
def __getitem__(self: Self, k: int) -> T:
...

def __getitem__(self, k):
page = self.page_number
Expand Down
6 changes: 3 additions & 3 deletions tableauserverclient/server/request_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -995,9 +995,9 @@ def update_req(self, workbook_item):
if data_freshness_policy_config.option == "FreshEvery":
if data_freshness_policy_config.fresh_every_schedule is not None:
fresh_every_element = ET.SubElement(data_freshness_policy_element, "freshEverySchedule")
fresh_every_element.attrib["frequency"] = (
data_freshness_policy_config.fresh_every_schedule.frequency
)
fresh_every_element.attrib[
"frequency"
] = data_freshness_policy_config.fresh_every_schedule.frequency
fresh_every_element.attrib["value"] = str(data_freshness_policy_config.fresh_every_schedule.value)
else:
raise ValueError(f"data_freshness_policy_config.fresh_every_schedule must be populated.")
Expand Down
1 change: 0 additions & 1 deletion tableauserverclient/server/request_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ class Direction:


class _DataExportOptions(RequestOptionsBase):

def __init__(self, maxage: int = -1):
super().__init__()
self.view_filters: list[tuple[str, str]] = []
Expand Down

0 comments on commit 5ef3602

Please sign in to comment.