Skip to content

CI: pydocstyle>=5.1.0, flake8-docstrings>=1.4.0 verified to work #18780

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

Merged
merged 1 commit into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- [ ] Is [Flake 8](https://flake8.pycqa.org/en/latest/) compliant (run `flake8` on changed files to check).
- [ ] New features are documented, with examples if plot related.
- [ ] Documentation is sphinx and numpydoc compliant (the docs should [build](https://matplotlib.org/devel/documenting_mpl.html#building-the-docs) without error).
- [ ] Conforms to Matplotlib style conventions (install `flake8-docstrings` and `pydocstyle<4` and run `flake8 --docstring-convention=all`).
- [ ] Conforms to Matplotlib style conventions (install `flake8-docstrings` and run `flake8 --docstring-convention=all`).
- [ ] New features have an entry in `doc/users/next_whats_new/` (follow instructions in README.rst there).
- [ ] API changes documented in `doc/api/next_api_changes/` (follow instructions in README.rst there).

Expand Down
2 changes: 1 addition & 1 deletion examples/style_sheets/plot_solarizedlight2.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

using all 8 accents of the color palette - starting with blue

ToDo:
Still TODO:

- Create alpha values for bar and stacked charts. .33 or .5
- Apply Layout Rules
Expand Down
18 changes: 9 additions & 9 deletions examples/text_labels_and_annotations/rainbow_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
On the matplotlib-users list back in February 2012, Gökhan Sever asked the
following question:

Is there a way in matplotlib to partially specify the color of a string?

Example:

plt.ylabel("Today is cloudy.")

How can I show "today" as red, "is" as green and "cloudy." as blue?

Thanks.
| Is there a way in matplotlib to partially specify the color of a string?
|
| Example:
|
| plt.ylabel("Today is cloudy.")
|
| How can I show "today" as red, "is" as green and "cloudy." as blue?
|
| Thanks.

The solution below is modified from Paul Ivanov's original answer.
"""
Expand Down
6 changes: 2 additions & 4 deletions lib/matplotlib/backends/backend_agg.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
An agg_ backend.

.. _agg: http://antigrain.com/
An `Anti-Grain Geometry <http://antigrain.com>`_ (AGG) backend.

Features that are implemented:

Expand All @@ -16,7 +14,7 @@
* draw polygon
* freetype2 w/ ft2font

TODO:
Still TODO:

* integrate screen dpi w/ ppi and text
"""
Expand Down
6 changes: 4 additions & 2 deletions requirements/testing/flake8.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Extra pip requirements for the GitHub Actions flake8 build

flake8>=3.8
pydocstyle<4.0
flake8-docstrings
# versions less than 5.1.0 raise on some interp'd docstrings
pydocstyle>=5.1.0
# 1.4.0 adds docstring-convention=all
flake8-docstrings>=1.4.0
9 changes: 0 additions & 9 deletions tutorials/text/mathtext.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
r"""
Writing mathematical expressions
================================

An introduction to writing mathematical expressions in Matplotlib.

You can use a subset TeX markup in any matplotlib text string by placing it
Expand Down Expand Up @@ -56,7 +55,6 @@

Subscripts and superscripts
---------------------------

To make subscripts and superscripts, use the ``'_'`` and ``'^'`` symbols::

r'$\alpha_i > \beta_i$'
Expand Down Expand Up @@ -86,7 +84,6 @@

Fractions, binomials, and stacked numbers
-----------------------------------------

Fractions, binomials, and stacked numbers can be created with the
``\frac{}{}``, ``\binom{}{}`` and ``\genfrac{}{}{}{}{}{}`` commands,
respectively::
Expand Down Expand Up @@ -130,7 +127,6 @@

Radicals
--------

Radicals can be produced with the ``\sqrt[]{}`` command. For example::

r'$\sqrt{2}$'
Expand All @@ -153,7 +149,6 @@

Fonts
-----

The default font is *italics* for mathematical symbols.

.. note::
Expand Down Expand Up @@ -270,7 +265,6 @@

Custom fonts
~~~~~~~~~~~~

mathtext also provides a way to use custom fonts for math. This method is
fairly tricky to use, and should be considered an experimental feature for
patient users only. By setting :rc:`mathtext.fontset` to ``custom``,
Expand Down Expand Up @@ -306,7 +300,6 @@

Accents
-------

An accent command may precede any symbol to add an accent above it. There are
long and short forms for some of them.

Expand Down Expand Up @@ -346,7 +339,6 @@

Symbols
-------

You can also use a large number of the TeX symbols, as in ``\infty``,
``\leftarrow``, ``\sum``, ``\int``.

Expand All @@ -359,7 +351,6 @@

Example
-------

Here is an example illustrating many of these features in context.

.. figure:: ../../gallery/pyplots/images/sphx_glr_pyplot_mathtext_001.png
Expand Down