sizmailov / pybind11-stubgen

Generate stubs for python modules
Other
238 stars 48 forks source link

Sorting is causing parent-child relationships to be defined out of order #231

Open daltairwalter opened 1 month ago

daltairwalter commented 1 month ago

When I run pybind11-stubgen, I see ouput:


class SimpleSetupArrayOutput(SimpleSetupEntity):  
    def getDataType(self) -> DATA_TYPE:  
        ...  
class SimpleSetupEntity:  
    def getName(self) -> str:  
        ... 

This is out of order because the SimpleSetupArrayOutput is a subclass of SimpleSetupEntity and this causes linting errors.  Is there a way to turn off sorting?  Or is it possible to sort and then reorder as necessary?
sillydan1 commented 3 weeks ago

I have this problem as well. The generated classes look like:

class BusyError(Error):
    pass
class Error(Exception):
    pass