File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
clients/algoliasearch-client-python/algoliasearch/http Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ def __init__(self) -> None:
19
19
def get (self ) -> str :
20
20
return self .value
21
21
22
- def add (self , segment : str , version : Optional [str ] = __version__ ) -> Self :
23
- self .value += "; {} ({})" .format (segment , version or __version__ )
22
+ def add (self , segment : str , version : Optional [str ] = None ) -> Self :
23
+ self .value += "; {}" .format (segment )
24
+
25
+ if version is not None :
26
+ self .value += " ({})" .format (version )
27
+
24
28
return self
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ def main():
13
13
client = SearchClientSync (
14
14
environ .get ("ALGOLIA_APPLICATION_ID" ), environ .get ("ALGOLIA_ADMIN_KEY" )
15
15
)
16
- client .add_user_agent ("playground" , None )
16
+ client .add_user_agent ("playground" , "Foo" )
17
17
18
18
print ("user_agent" , client ._config ._user_agent .get ())
19
19
print ("client initialized" , client )
You can’t perform that action at this time.
0 commit comments