Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for overloads #1697

Open
adam-urbanczyk opened this issue Nov 4, 2024 · 2 comments
Open

Docs for overloads #1697

adam-urbanczyk opened this issue Nov 4, 2024 · 2 comments
Labels

Comments

@adam-urbanczyk
Copy link
Member

Currently oveload docstrings are simply ignored.

Possible solutions (TBC):

@lorenzncode
Copy link
Member

Current docs (to capture the current state):

Workplane.split
API Ref:
https://cadquery.readthedocs.io/en/latest/apireference.html
image

Class Summary:
image

Assembly.add is an example where the docstrings on the overloads are ignored.
image

The Workplane.split overload docstrings are empty. docstrings added only to the non-@overload-decorated definition.

In the case of Assembly.add docstrings are added to the decorated and non-decorated defs.

@lorenzncode
Copy link
Member

I tried with sphinx_toolbox.more_autodoc.overloads. It provides an on option overloads_location.

Here is Assembly.add with overloads_location=signature:

image

overloads_location=top
image

overloads_location=bottom
image

It didn't provide access to the other docstrings in the decorated defs, at least that I could find easily. I'll take a look at the other possible solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants