Skip to content

Unable to add docstrings for callback functions #65

@benknight135

Description

@benknight135

Unable to add docstrings for callback functions.
Functions using std::function parameters fail to generate stubs.

[2022-09-08 11:27:11,223] {__init__.py:131} WARNING - Generated stubs signature is degraded to `(*args, **kwargs) -> typing.Any` for
[2022-09-08 11:27:11,224] {__init__.py:135} WARNING - def setReadThreadCallback(self: phase.pyphase.stereocamera.AbstractStereoCamera, callback: std::function<void __cdecl(I3DR::Phase::CameraReadResult)>) -> None: ...       
[2022-09-08 11:27:11,225] {__init__.py:136} WARNING -
                                    ^-- Invalid syntax
[2022-09-08 11:27:11,244] {__init__.py:131} WARNING - Generated stubs signature is degraded to `(*args, **kwargs) -> typing.Any` for
[2022-09-08 11:27:11,244] {__init__.py:135} WARNING - def setReadThreadCallback(self: phase.pyphase.stereocamera.DeimosStereoCamera, callback: std::function<void __cdecl(I3DR::Phase::CameraReadResult)>) -> None: ...
[2022-09-08 11:27:11,244] {__init__.py:136} WARNING -
                                  ^-- Invalid syntax
[2022-09-08 11:27:11,252] {__init__.py:131} WARNING - Generated stubs signature is degraded to `(*args, **kwargs) -> typing.Any` for
[2022-09-08 11:27:11,252] {__init__.py:135} WARNING - def setReadThreadCallback(self: phase.pyphase.stereocamera.PhobosStereoCamera, callback: std::function<void __cdecl(I3DR::Phase::CameraReadResult)>) -> None: ...
[2022-09-08 11:27:11,253] {__init__.py:136} WARNING -
                                  ^-- Invalid syntax
[2022-09-08 11:27:11,258] {__init__.py:131} WARNING - Generated stubs signature is degraded to `(*args, **kwargs) -> typing.Any` for
[2022-09-08 11:27:11,258] {__init__.py:135} WARNING - def setReadThreadCallback(self: phase.pyphase.stereocamera.PylonStereoCamera, callback: std::function<void __cdecl(I3DR::Phase::CameraReadResult)>) -> None: ...
[2022-09-08 11:27:11,259] {__init__.py:136} WARNING -
                                 ^-- Invalid syntax
[2022-09-08 11:27:11,268] {__init__.py:131} WARNING - Generated stubs signature is degraded to `(*args, **kwargs) -> typing.Any` for
[2022-09-08 11:27:11,269] {__init__.py:135} WARNING - def setReadThreadCallback(self: phase.pyphase.stereocamera.TitaniaStereoCamera, callback: std::function<void __cdecl(I3DR::Phase::CameraReadResult)>) -> None: ...        
[2022-09-08 11:27:11,269] {__init__.py:136} WARNING -
                                   ^-- Invalid syntax
[2022-09-08 11:27:11,276] {__init__.py:131} WARNING - Generated stubs signature is degraded to `(*args, **kwargs) -> typing.Any` for
[2022-09-08 11:27:11,277] {__init__.py:135} WARNING - def setReadThreadCallback(self: phase.pyphase.stereocamera.UVCStereoCamera, callback: std::function<void __cdecl(I3DR::Phase::CameraReadResult)>) -> None: ...
[2022-09-08 11:27:11,278] {__init__.py:136} WARNING -
                               ^-- Invalid syntax
[2022-09-08 11:27:11,283] {__init__.py:131} WARNING - Generated stubs signature is degraded to `(*args, **kwargs) -> typing.Any` for
[2022-09-08 11:27:11,284] {__init__.py:135} WARNING - def setComputeThreadCallback(self: phase.pyphase.stereomatcher.AbstractStereoMatcher, callback: std::function<void __cdecl(void)>) -> None: ...
[2022-09-08 11:27:11,284] {__init__.py:136} WARNING -
                                         ^-- Invalid syntax
[2022-09-08 11:27:11,287] {__init__.py:131} WARNING - Generated stubs signature is degraded to `(*args, **kwargs) -> typing.Any` for
[2022-09-08 11:27:11,288] {__init__.py:135} WARNING - def setComputeThreadCallback(self: phase.pyphase.stereomatcher.StereoBM, callback: std::function<void __cdecl(void)>) -> None: ...
[2022-09-08 11:27:11,288] {__init__.py:136} WARNING -
                            ^-- Invalid syntax
[2022-09-08 11:27:11,297] {__init__.py:131} WARNING - Generated stubs signature is degraded to `(*args, **kwargs) -> typing.Any` for
[2022-09-08 11:27:11,298] {__init__.py:135} WARNING - def setComputeThreadCallback(self: phase.pyphase.stereomatcher.StereoI3DRSGM, callback: std::function<void __cdecl(void)>) -> None: ...
[2022-09-08 11:27:11,298] {__init__.py:136} WARNING -
                                 ^-- Invalid syntax
[2022-09-08 11:27:11,303] {__init__.py:131} WARNING - Generated stubs signature is degraded to `(*args, **kwargs) -> typing.Any` for
[2022-09-08 11:27:11,304] {__init__.py:135} WARNING - def setComputeThreadCallback(self: phase.pyphase.stereomatcher.StereoSGBM, callback: std::function<void __cdecl(void)>) -> None: ...
[2022-09-08 11:27:11,305] {__init__.py:136} WARNING -
                              ^-- Invalid syntax
[2022-09-08 11:27:11,353] {__init__.py:957} INFO - Useful link: Avoiding C++ types in docstrings:
[2022-09-08 11:27:11,354] {__init__.py:958} INFO -       https://pybind11.readthedocs.io/en/latest/advanced/misc.html#avoiding-cpp-types-in-docstrings

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions