sphinx-automodapi icon indicating copy to clipboard operation
sphinx-automodapi copied to clipboard

Add automodsumm_ignore_emptydoc global option and flags

Open lukelbd opened this issue 5 years ago • 1 comments

Implements item 1 from #91. This adds and documents the automodsumm_ignore_emptydoc flag and :ignore-emptydoc: and :no-ignore-emptydoc: options, which can be thought of as an expansion of automodsumm_inherited_methods, :inherited-methods:, and :no-inherited-methods:.

These options are used to ignore "public" (i.e. name does not start with _) class methods with empty __doc__ attributes. This can be used to let developers override public methods or classes from external libraries, but suppress documentation of those overrides. Developers may want to leave out the docstring from an overridden public method so that when users query help(cls.method), they get the original, rich documentation from the external library, and they do not have to reproduce the external library documentation in their bare-bones override function.

This may be a bit niche for ProPlot but I think it's a pretty harmless addition, and it of course defaults to False.

lukelbd avatar May 25 '20 01:05 lukelbd

Codecov Report

Merging #102 into master will decrease coverage by 0.47%. The diff coverage is 64.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #102      +/-   ##
==========================================
- Coverage   87.19%   86.72%   -0.48%     
==========================================
  Files           5        5              
  Lines         695      708      +13     
==========================================
+ Hits          606      614       +8     
- Misses         89       94       +5     
Impacted Files Coverage Δ
sphinx_automodapi/automodapi.py 89.15% <55.55%> (-1.99%) :arrow_down:
sphinx_automodapi/automodsumm.py 85.67% <80.00%> (-0.09%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4c8e33c...50b9e1b. Read the comment docs.

codecov[bot] avatar May 25 '20 01:05 codecov[bot]