Replies: 8 comments 8 replies
-
should be... |
Beta Was this translation helpful? Give feedback.
-
Meybe |
Beta Was this translation helpful? Give feedback.
-
That’s the one! I have to write them all by hand, so it’s going to take a minute. |
Beta Was this translation helpful? Give feedback.
-
I don't know how boost::python works, but I see that many methods have stubs - were they generated automatically by
the docstrings do not provide the names of the method parameters, I assume it is not arg1, arg2, arg3 etc., that's why I used positional-only parameters |
Beta Was this translation helpful? Give feedback.
-
I have a stub generator, what you posted generated from boost’s docstring, without modification I just learned about the @overload, so I’m doing exactly what you suggest, parsing that docstring I’ll go through and do all the constructors first. this is the output of Db.Text.... getting close : ) class Text:
@overload
def __init__ (self, /)-> None :
...
@overload
def __init__ (self, position: PyGe.Point3d, text: str)-> None :
...
@overload
def __init__ (self, position: PyGe.Point3d, text: str, height: float, rotation: float)-> None :
...
@overload
def __init__ (self, id: PyDb.ObjectId)-> None :
...
@overload
def __init__ (self, id: PyDb.ObjectId, mode: PyDb.OpenMode)-> None :
...
@overload
def __init__ (self, id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool)-> None :
...
def __init__ (self)-> None :
'''Overloads:
- None: Any
- position: PyGe.Point3d, text: str
- position: PyGe.Point3d, text: str, height: float, rotation: float
- id: PyDb.ObjectId
- id: PyDb.ObjectId, mode: PyDb.OpenMode
- id: PyDb.ObjectId, mode: PyDb.OpenMode, erased: bool
'''
... |
Beta Was this translation helpful? Give feedback.
-
I see that in each class you define all methods, including inherited ones: class Entity(DbObject):
def addReactor (self, reactor: PyDb.EntityReactor)-> None :
...
class Curve(Entity):
def addReactor (self, reactor: PyDb.EntityReactor)-> None :
...
class Line(Curve):
def addReactor (self, reactor: PyDb.EntityReactor)-> None :
... it is enough only in the first class: class Entity(DbObject):
def addReactor (self, reactor: PyDb.EntityReactor)-> None :
...
class Curve(Entity):
...
class Line(Curve):
... |
Beta Was this translation helpful? Give feedback.
-
Hi, I worked a bit on the stubs.
|
Beta Was this translation helpful? Give feedback.
-
I noticed there's some activity with boost::python's signatures and doc strings. I'll have a look when I get back |
Beta Was this translation helpful? Give feedback.
-
I made a prototype of function overloading. Need to implement it.
Beta Was this translation helpful? Give feedback.
All reactions