machow / plotnine-docs-demo

MIT License
0 stars 2 forks source link

Re-write sphinx comment-style docstrings to use string-underneath syntax #21

Open machow opened 1 year ago

machow commented 1 year ago

The attributes in plotnine.options look as follows:

#: Development flag, e.g. set to ``True`` to prevent
#: the queuing up of figures when errors happen.
close_all_figures = False

#: Theme used when none is added to the ggplot object
current_theme = None

#: The base font family for all text that is part of the theme.
#: Default is sans-serif and one is choosen automatically from
#: rcParams["font.san-serif"]
base_family = "sans-serif"

Note that lines starting with #: are a special comment-based docstring syntax in sphinx. This isn't currently supported in griffe.

I can open a feature request on griffe, but if us changing these to use the """ docstring syntax is an option, it might get us over the finish line a bit faster 😅

With the other syntax it looks like...

close_all_figures = False
"""
Development flag, e.g. set to ``True`` to prevent
the queuing up of figures when errors happen.
"""

current_theme = None
"""Theme used when none is added to the ggplot object"""

@has2k1 WDYT?

has2k1 commented 1 year ago

The docstring option is okay.