Replies: 19 comments 39 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.
-
If I understand correctly, Lines 868 to 884 in fe06413 |
Beta Was this translation helpful? Give feedback.
-
I'm almost done with improving stubs. Please fix these bugs. |
Beta Was this translation helpful? Give feedback.
-
You're like a next level coder, an artist! looking at PyDb.ErrorStatusException. I see I also have a bug, I'll try to fix this morning |
Beta Was this translation helpful? Give feedback.
-
Are all stubs generated on one host? on BRX? |
Beta Was this translation helpful? Give feedback.
-
Originally, I had thought about letting the user generate stubs to account for API differences, but then decided not to. Stubs generated from ARX, GRX, ZRX are very close and I can probably do some of the implementation to resolve differences, I.e. AcCmColor it could still be an option someday |
Beta Was this translation helpful? Give feedback.
-
Is it possible to generate html docs, like in pydoc, but from the .pyi files instead of the main modules? |
Beta Was this translation helpful? Give feedback.
-
The old generator would warn me if the return type was not fully resolved (I.e. a list or a tuple) and not in return_types.json. |
Beta Was this translation helpful? Give feedback.
-
Pylance failed to parse docstring #6951 I guess this could be us? |
Beta Was this translation helpful? Give feedback.
-
I thought about creating |
Beta Was this translation helpful? Give feedback.
-
For example |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I made a prototype of function overloading. Need to implement it.

Beta Was this translation helpful? Give feedback.
All reactions