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
Is your feature request related to a problem? Please describe.
The cocotb project is using the
autodatadirective to document a global module variable, whose default value isNone(and assigned in an initialization function). We would prefer to remove the= Nonefrom 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
Nonevalue 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: : TypeHintbut 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