Skip to content
Closed
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ classifiers = [
repository = "https://github.com/tableau/server-client-python"

[project.optional-dependencies]
test = ["black==24.10", "build", "mypy==1.4", "pytest>=7.0", "pytest-cov", "pytest-subtests",
test = ["black==26.3.1", "build", "mypy==1.4", "pytest>=7.0", "pytest-cov", "pytest-subtests",
"pytest-xdist", "requests-mock>=1.0,<2.0", "types-requests>=2.32.4.20250913"]

[tool.setuptools.package-data]
Expand Down
2 changes: 1 addition & 1 deletion samples/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def main():
# We encode that information above in the const=(...) parameter to the add_argument function to make
# the code automatically adapt for the type of export the user is doing.
# We unroll that information into methods we can call, or objects we can create by using getattr()
(populate_func_name, option_factory_name, member_name, extension) = args.type
populate_func_name, option_factory_name, member_name, extension = args.type
populate = getattr(server.views, populate_func_name)
if args.workbook:
populate = getattr(server.workbooks, populate_func_name)
Expand Down
1 change: 0 additions & 1 deletion samples/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import logging
import tableauserverclient as TSC


logger = logging.getLogger("Sample")
logger.setLevel(logging.DEBUG)
logger.addHandler(logging.StreamHandler())
Expand Down
1 change: 0 additions & 1 deletion tableauserverclient/datetime_helpers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import datetime


ZERO = datetime.timedelta(0)
HOUR = datetime.timedelta(hours=1)

Expand Down
1 change: 0 additions & 1 deletion tableauserverclient/helpers/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from functools import singledispatch
from typing import TypeVar, overload


# the redact method can handle either strings or bytes, but it can't mix them.
# Generic type so we can write the actual logic once, then use singledispatch to
# create the replacement text with the correct type
Expand Down
2 changes: 1 addition & 1 deletion tableauserverclient/models/column_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def from_response(cls, resp, ns):
all_column_xml = parsed_response.findall(".//t:column", namespaces=ns)

for column_xml in all_column_xml:
(id, name, description, remote_type) = cls._parse_element(column_xml, ns)
id, name, description, remote_type = cls._parse_element(column_xml, ns)
column_item = cls(name)
column_item._set_values(id, name, description, remote_type)
all_column_items.append(column_item)
Expand Down
4 changes: 1 addition & 3 deletions tableauserverclient/models/data_alert_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ def __init__(self):

def __repr__(self) -> str:
return "<Data Alert {_id} subject={_subject} frequency={_frequency} \
public={_public}>".format(
**self.__dict__
)
public={_public}>".format(**self.__dict__)

@property
def id(self) -> str | None:
Expand Down
8 changes: 2 additions & 6 deletions tableauserverclient/models/subscription_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@ def __init__(self, subject: str, schedule_id: str, user_id: str, target: "Target
def __repr__(self) -> str:
if self.id is not None:
return "<Subscription#{_id} subject({subject}) schedule_id({schedule_id}) user_id({user_id}) \
target({target})".format(
**self.__dict__
)
target({target})".format(**self.__dict__)
else:
return "<Subscription subject({subject}) schedule_id({schedule_id}) user_id({user_id}) \
target({target})".format(
**self.__dict__
)
target({target})".format(**self.__dict__)

@property
def id(self):
Expand Down
1 change: 0 additions & 1 deletion tableauserverclient/server/endpoint/data_alert_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from typing import TYPE_CHECKING


if TYPE_CHECKING:
from ..server import Server
from ..request_options import RequestOptions
Expand Down
2 changes: 1 addition & 1 deletion tableauserverclient/server/endpoint/schedules_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def add_to_schedule(
task_type = TaskItem.Type.RunFlow
items.append(
(schedule_id, flow, "flow", RequestFactory.Schedule.add_flow_req, task_type)
) # type:ignore[arg-type]
) # type: ignore[arg-type]

results = (self._add_to(*x) for x in items)
return [x for x in results if not x.result]
Expand Down
1 change: 0 additions & 1 deletion tableauserverclient/server/pager.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from tableauserverclient.models.pagination_item import PaginationItem
from tableauserverclient.server.request_options import RequestOptions


T = TypeVar("T")


Expand Down
2 changes: 1 addition & 1 deletion tableauserverclient/server/request_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ def update_req(self, schedule_item):
intervals_element = ET.SubElement(frequency_element, "intervals")
if hasattr(interval_item, "interval"):
for interval in interval_item._interval_type_pairs():
(expression, value) = interval
expression, value = interval
single_interval_element = ET.SubElement(intervals_element, "interval")
single_interval_element.attrib[expression] = value
return ET.tostring(xml_request)
Expand Down
1 change: 0 additions & 1 deletion tableauserverclient/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
from tableauserverclient.server.endpoint.exceptions import NotSignedInError
from tableauserverclient.namespace import Namespace


_PRODUCT_TO_REST_VERSION = {
"10.0": "2.3",
"9.3": "2.2",
Expand Down
1 change: 0 additions & 1 deletion test/test_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import tableauserverclient as TSC


TEST_ASSET_DIR = Path(__file__).parent / "assets"

GET_SERVER_EXT_SETTINGS = TEST_ASSET_DIR / "extensions_server_settings_true.xml"
Expand Down
1 change: 0 additions & 1 deletion test/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from tableauserverclient.server.endpoint.exceptions import JobFailedException
from ._utils import mocked_time


TEST_ASSET_DIR = Path(__file__).parent / "assets"
GET_XML = TEST_ASSET_DIR / "job_get.xml"
GET_BY_ID_XML = TEST_ASSET_DIR / "job_get_by_id.xml"
Expand Down
Loading