diff --git a/pyproject.toml b/pyproject.toml index c832ffe71..ebb4fe8be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] diff --git a/samples/export.py b/samples/export.py index b2506cf46..3200d491f 100644 --- a/samples/export.py +++ b/samples/export.py @@ -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) diff --git a/samples/smoke_test.py b/samples/smoke_test.py index b23eacdb8..778686abf 100644 --- a/samples/smoke_test.py +++ b/samples/smoke_test.py @@ -4,7 +4,6 @@ import logging import tableauserverclient as TSC - logger = logging.getLogger("Sample") logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler()) diff --git a/tableauserverclient/datetime_helpers.py b/tableauserverclient/datetime_helpers.py index 00f62faf8..7beb0276e 100644 --- a/tableauserverclient/datetime_helpers.py +++ b/tableauserverclient/datetime_helpers.py @@ -1,6 +1,5 @@ import datetime - ZERO = datetime.timedelta(0) HOUR = datetime.timedelta(hours=1) diff --git a/tableauserverclient/helpers/strings.py b/tableauserverclient/helpers/strings.py index 6ba4e48d9..1ad70e677 100644 --- a/tableauserverclient/helpers/strings.py +++ b/tableauserverclient/helpers/strings.py @@ -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 diff --git a/tableauserverclient/models/column_item.py b/tableauserverclient/models/column_item.py index 3a7416e28..dd4c1254f 100644 --- a/tableauserverclient/models/column_item.py +++ b/tableauserverclient/models/column_item.py @@ -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) diff --git a/tableauserverclient/models/data_alert_item.py b/tableauserverclient/models/data_alert_item.py index ff62c3ae8..02ebb6409 100644 --- a/tableauserverclient/models/data_alert_item.py +++ b/tableauserverclient/models/data_alert_item.py @@ -37,9 +37,7 @@ def __init__(self): def __repr__(self) -> str: return "".format( - **self.__dict__ - ) + public={_public}>".format(**self.__dict__) @property def id(self) -> str | None: diff --git a/tableauserverclient/models/subscription_item.py b/tableauserverclient/models/subscription_item.py index 61c75e2d6..9ae99e398 100644 --- a/tableauserverclient/models/subscription_item.py +++ b/tableauserverclient/models/subscription_item.py @@ -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 "