From 5ef360279b28240d68c178d8a661bd84440f975c Mon Sep 17 00:00:00 2001 From: "jac.fitzgerald" Date: Sun, 29 Sep 2024 22:34:40 -0700 Subject: [PATCH] correct version of black --- tableauserverclient/server/pager.py | 6 ++++-- tableauserverclient/server/query.py | 6 ++++-- tableauserverclient/server/request_factory.py | 6 +++--- tableauserverclient/server/request_options.py | 1 - 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tableauserverclient/server/pager.py b/tableauserverclient/server/pager.py index 7bfcb1e9..ca9d8387 100644 --- a/tableauserverclient/server/pager.py +++ b/tableauserverclient/server/pager.py @@ -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]): diff --git a/tableauserverclient/server/query.py b/tableauserverclient/server/query.py index ea764df1..bbca612e 100644 --- a/tableauserverclient/server/query.py +++ b/tableauserverclient/server/query.py @@ -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 diff --git a/tableauserverclient/server/request_factory.py b/tableauserverclient/server/request_factory.py index 06156be1..96fa1468 100644 --- a/tableauserverclient/server/request_factory.py +++ b/tableauserverclient/server/request_factory.py @@ -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.") diff --git a/tableauserverclient/server/request_options.py b/tableauserverclient/server/request_options.py index cc2f88e9..c8475419 100644 --- a/tableauserverclient/server/request_options.py +++ b/tableauserverclient/server/request_options.py @@ -164,7 +164,6 @@ class Direction: class _DataExportOptions(RequestOptionsBase): - def __init__(self, maxage: int = -1): super().__init__() self.view_filters: list[tuple[str, str]] = []