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

Documentation misses CachedClassProps #86

Open
0Hughman0 opened this issue Sep 9, 2023 · 0 comments
Open

Documentation misses CachedClassProps #86

0Hughman0 opened this issue Sep 9, 2023 · 0 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@0Hughman0
Copy link
Owner

0Hughman0 commented Sep 9, 2023

The accessors continue to cause chaos.

Sphinx autodoc doesn't manage to generate docstrings for any CachedClassProps, presumably because it just gets those attributes from the class, which get returned as the cached value.

This means things like TierBase.name_part_template are missing from the docs - they're important!

A solution may be found add some sort of preprocessor or whatever to Sphinx:

https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#event-autodoc-process-docstring

The CachedClassProps can be fetch from the classes using the syntax (which bypasses the accessor protocol):

>>> TierBase.__dict__['name_part_template']
CachedClassProp

and it seems the wraps is passing on the correct docstring. So it should be possible to generate the docstring I think, provided we can find a way to get the right object to Sphinx.

@0Hughman0 0Hughman0 added bug Something isn't working documentation Improvements or additions to documentation labels Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant