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

Add autodata option to remove value but display type info #8209

Closed
marlonjames opened this issue Sep 14, 2020 · 0 comments
Closed

Add autodata option to remove value but display type info #8209

marlonjames opened this issue Sep 14, 2020 · 0 comments
Labels
extensions:autodoc type:enhancement enhance or introduce a new feature
Milestone

Comments

@marlonjames
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The cocotb project is using the autodata directive to document a global module variable, whose default value is None (and assigned in an initialization function). We would prefer to remove the = None from the documentation but retain the type information that comes from a type hint comment in the source code.
Using the :annotation: option with a blank string removes the None value but also removes the type information.

Describe the solution you'd like
Have an option for removing the value but keeping the type information. Something like the :novalue: option that was renamed to the current :annotation:.

Describe alternatives you've considered
Using the :annotation: option can replicate the type information manually: :annotation: : TypeHint but this is a manual process and dual maintenance when the information is in the source file.

Additional context
PR where this was discussed: cocotb/cocotb#2069

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions:autodoc type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

2 participants