8000 fix: ParamSpec introduced in 3.10 · tableau/server-client-python@99d330f · GitHub
[go: up one dir, main page]

Skip to content

Commit 99d330f

Browse files
committed
fix: ParamSpec introduced in 3.10
1 parent 01b171e commit 99d330f

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

tableauserverclient/server/endpoint/endpoint.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing_extensions import Concatenate
1+
from typing_extensions import Concatenate, ParamSpec
22
from tableauserverclient import datetime_helpers as datetime
33

44
import abc
@@ -13,7 +13,6 @@
1313
List,
1414
Optional,
1515
TYPE_CHECKING,
16-
ParamSpec,
1716
Tuple,
1817
TypeVar,
1918
Union,

tableauserverclient/server/request_factory.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import xml.etree.ElementTree as ET
2-
from typing import Any, Callable, Dict, Iterable, List, Optional, ParamSpec, Set, Tuple, TypeVar, TYPE_CHECKING, Union
2+
from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Tuple, TypeVar, TYPE_CHECKING, Union
3+
4+
from typing_extensions import ParamSpec
35

46
from requests.packages.urllib3.fields import RequestField
57
from requests.packages.urllib3.filepost import encode_multipart_formdata

test/test_tagging.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ def test_delete_tags(get_server, endpoint_type, item, tags) -> None:
153153
urls = {r.url.split("/")[-1] for r in history}
154154
assert urls == tag_set
155155

156+
156157
@pytest.mark.parametrize("endpoint_type, item", *sample_taggable_items)
157158
@pytest.mark.parametrize("tags", sample_tags)
158159
def test_update_tags(get_server, endpoint_type, item, tags) -> None:
@@ -163,7 +164,7 @@ def test_update_tags(get_server, endpoint_type, item, tags) -> None:
163164
tags = set([tags] if isinstance(tags, str) else tags)
164165
with ExitStack() as stack:
165166
if hasattr(item, "_initial_tags"):
166-
initial_tags = set(['x','y','z'])
167+
initial_tags = set(["x", "y", "z"])
167168
item._initial_tags = initial_tags
168169
add_tags_xml = add_tag_xml_response_factory(tags - initial_tags)
169170
delete_tags_xml = add_tag_xml_response_factory(initial_tags - tags)
@@ -186,7 +187,6 @@ def test_update_tags(get_server, endpoint_type, item, tags) -> None:
186187
else:
187188
stack.enter_context(pytest.raises(NotImplementedError))
188189

189-
190190
endpoint.update_tags(item)
191191

192192

0 commit comments

Comments
 (0)
0