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
However, the python types are not being generated properly, so I get the following error when trying to pass a cycletls.Options to the Request function in python:
# Python type for cycletls.Optionsclasscycletls_Options(GoClass):
""""""def__init__(self, *args, **kwargs):
""" handle=A Go-side object is always initialized with an explicit handle=arg """iflen(kwargs) ==1and'handle'inkwargs:
self.handle=kwargs['handle']
_request.IncRef(self.handle)
eliflen(args) ==1andisinstance(args[0], GoClass):
self.handle=args[0].handle_request.IncRef(self.handle)
eliflen(args) ==1andisinstance(args[0], int):
self.handle=args[0]
_request.IncRef(self.handle)
else:
self.handle=0def__del__(self):
_request.DecRef(self.handle)
# Python type for cycletls.Responseclasscycletls_Response(GoClass):
""""""def__init__(self, *args, **kwargs):
""" handle=A Go-side object is always initialized with an explicit handle=arg """iflen(kwargs) ==1and'handle'inkwargs:
self.handle=kwargs['handle']
_request.IncRef(self.handle)
eliflen(args) ==1andisinstance(args[0], GoClass):
self.handle=args[0].handle_request.IncRef(self.handle)
eliflen(args) ==1andisinstance(args[0], int):
self.handle=args[0]
_request.IncRef(self.handle)
else:
self.handle=0def__del__(self):
_request.DecRef(self.handle)
As a workaround, I was able to make it work by redefining the types in my go package, but it is a bit annoying, since I have to redefine the subtypes in cycletls.Options and rebuild the struct inside the function.
The text was updated successfully, but these errors were encountered:
I'm trying to build a function which uses imported types as argument and as return type:
However, the python types are not being generated properly, so I get the following error when trying to pass a
cycletls.Options
to theRequest
function in python:Here are the go types:
And here are the generated python types:
As a workaround, I was able to make it work by redefining the types in my go package, but it is a bit annoying, since I have to redefine the subtypes in
cycletls.Options
and rebuild the struct inside the function.The text was updated successfully, but these errors were encountered: