You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a small thing, but I'm so used to instantiating Python objects like this:
client=SearchClient(app_id, api_key)
that I didn't even think about using SearchClient.create(..). It took me some time to figure this out, because by chance, the SearchClient.__init__ method accepts two arguments and there's no validation.
throws a traceback because self._transporters is now an instance of str.
Expected Behavior
Ideally, the SearchClient object should behave like other Python objects, with user-provided arguments to the __init__ method. If that won't work, can it be an empty __init__ method without user arguments, and you assign the transporter and config attributes in the create method or elsewhere?
The text was updated successfully, but these errors were encountered:
Description
It's a small thing, but I'm so used to instantiating Python objects like this:
that I didn't even think about using
SearchClient.create(..)
. It took me some time to figure this out, because by chance, theSearchClient.__init__
method accepts two arguments and there's no validation.Steps To Reproduce
For example:
throws a traceback because
self._transporters
is now an instance ofstr
.Expected Behavior
Ideally, the
SearchClient
object should behave like other Python objects, with user-provided arguments to the__init__
method. If that won't work, can it be an empty__init__
method without user arguments, and you assign thetransporter
andconfig
attributes in thecreate
method or elsewhere?The text was updated successfully, but these errors were encountered: