Skip to content

Commit 58f8504

Browse files
committed
fix: no need async
1 parent cdad0fa commit 58f8504

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

clients/algoliasearch-client-python/algoliasearch/http/user_agent.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@ def get(self) -> str:
2020
return self.value
2121

2222
def add(self, segment: str, version: Optional[str] = __version__) -> Self:
23-
self.value += "; {} ({})".format(segment, __version__ if version is None else version)
23+
self.value += "; {} ({})".format(
24+
segment, __version__ if version is None else version
25+
)
2426
return self

templates/python/api.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ class {{classname}}{{#isSyncClient}}Sync{{/isSyncClient}}:
9898
return self._transporter.close()
9999
{{/isSyncClient}}
100100

101-
{{^isSyncClient}}async {{/isSyncClient}}def set_client_api_key(self, api_key: str) -> None:
101+
def set_client_api_key(self, api_key: str) -> None:
102102
"""Sets a new API key to authenticate requests."""
103103
self._transporter.config.set_client_api_key(api_key)
104104

105-
{{^isSyncClient}}async {{/isSyncClient}}def add_user_agent(self, segment: str, version: Optional[str] = None) -> None:
105+
def add_user_agent(self, segment: str, version: Optional[str] = None) -> None:
106106
"""adds a segment to the default user agent, and update the headers sent with each requests as well"""
107107
self._transporter.config.add_user_agent(segment, version)
108108

0 commit comments

Comments
 (0)