Fix a warning in the doc build. by anntzer · Pull Request #13225 · matplotlib/matplotlib · GitHub
Skip to content

Fix a warning in the doc build. - #13225

Merged
dstansby merged 1 commit into
matplotlib:masterfrom
anntzer:docwarn
Jan 20, 2019
Merged

dstansby merged 1 commit into
matplotlib:masterfrom
anntzer:docwarn

Conversation

@anntzer

@anntzer anntzer commented Jan 19, 2019

Copy link
Copy Markdown
Contributor

PR Summary

Search for

/home/circleci/.local/lib/python3.7/site-packages/numpydoc/docscrape.py:377: UserWarning: Unknown section Note in the docstring of <class 'matplotlib.scale.ScaleBase'> in /home/circleci/project/lib/matplotlib/scale.py.

in https://circleci.com/gh/matplotlib/matplotlib/17517 (for example).

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@tacaswell tacaswell added this to the v3.1 milestone Jan 19, 2019
jklymak
jklymak previously approved these changes Jan 19, 2019
@jklymak
jklymak dismissed their stale review January 19, 2019 16:18

goops, doesn't actually work...

@anntzer

anntzer commented Jan 19, 2019

Copy link
Copy Markdown
Contributor Author

@timhoffm

Copy link
Copy Markdown
Member

It really depends what you want. .. note:: gives an admonition box. The Notes section is a numpydoc section (Not that it has to be plural which was the reason for the warning).

@anntzer

anntzer commented Jan 19, 2019

Copy link
Copy Markdown
Contributor Author

The problem is that the docstring of the scale gets copied into the docstring of Axis.set_scale, and then the Notes end up indented, once it's NoteS with an "s" numpydoc tries to handle that and all hell breaks loose.

@timhoffm timhoffm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning is gone, however, the rendered docs for set_zscale are a bit odd.

@anntzer

anntzer commented Jan 19, 2019

Copy link
Copy Markdown
Contributor Author

@dstansby
dstansby merged commit 8392fad into matplotlib:master Jan 20, 2019
@anntzer
anntzer deleted the docwarn branch January 20, 2019 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants