Skip to content

Commit 10148aa

Browse files
Merge #899
899: Fix potential type error in client_agents r=curquiza a=sanders41 # Pull Request ## Related issue Fixes #898 ## What does this PR do? - Allows for more than one string to be added to the tuple when sending `client_agents`. ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! Co-authored-by: Paul Sanders <[email protected]>
2 parents 114ba6f + 806a826 commit 10148aa

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

meilisearch/_httprequests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def __validate(request: requests.Response) -> Any:
119119

120120

121121
@lru_cache(maxsize=1)
122-
def _build_user_agent(client_agents: Optional[Tuple[str]] = None) -> str:
122+
def _build_user_agent(client_agents: Optional[Tuple[str, ...]] = None) -> str:
123123
user_agent = qualified_version()
124124
if not client_agents:
125125
return user_agent

meilisearch/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __init__(
3333
url: str,
3434
api_key: Optional[str] = None,
3535
timeout: Optional[int] = None,
36-
client_agents: Optional[Tuple[str]] = None,
36+
client_agents: Optional[Tuple[str, ...]] = None,
3737
) -> None:
3838
"""
3939
Parameters

meilisearch/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(
4444
url: str,
4545
api_key: Optional[str] = None,
4646
timeout: Optional[int] = None,
47-
client_agents: Optional[Tuple[str]] = None,
47+
client_agents: Optional[Tuple[str, ...]] = None,
4848
) -> None:
4949
"""
5050
Parameters

0 commit comments

Comments
 (0)