diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ccc8eb320e54..6c3479d74741 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -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). diff --git a/examples/style_sheets/plot_solarizedlight2.py b/examples/style_sheets/plot_solarizedlight2.py index 0051a5cf69dc..530e4027cdc6 100644 --- a/examples/style_sheets/plot_solarizedlight2.py +++ b/examples/style_sheets/plot_solarizedlight2.py @@ -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 diff --git a/examples/text_labels_and_annotations/rainbow_text.py b/examples/text_labels_and_annotations/rainbow_text.py index 4eea8479891c..e66bef4b54af 100644 --- a/examples/text_labels_and_annotations/rainbow_text.py +++ b/examples/text_labels_and_annotations/rainbow_text.py @@ -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. """ diff --git a/lib/matplotlib/backends/backend_agg.py b/lib/matplotlib/backends/backend_agg.py index b9bde4d783e5..09f16afa2131 100644 --- a/lib/matplotlib/backends/backend_agg.py +++ b/lib/matplotlib/backends/backend_agg.py @@ -1,7 +1,5 @@ """ -An agg_ backend. - -.. _agg: http://antigrain.com/ +An `Anti-Grain Geometry `_ (AGG) backend. Features that are implemented: @@ -16,7 +14,7 @@ * draw polygon * freetype2 w/ ft2font -TODO: +Still TODO: * integrate screen dpi w/ ppi and text """ diff --git a/requirements/testing/flake8.txt b/requirements/testing/flake8.txt index b5277c656632..f98708973072 100644 --- a/requirements/testing/flake8.txt +++ b/requirements/testing/flake8.txt @@ -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 diff --git a/tutorials/text/mathtext.py b/tutorials/text/mathtext.py index 709f1df4956b..8c67142e1dc5 100644 --- a/tutorials/text/mathtext.py +++ b/tutorials/text/mathtext.py @@ -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 @@ -56,7 +55,6 @@ Subscripts and superscripts --------------------------- - To make subscripts and superscripts, use the ``'_'`` and ``'^'`` symbols:: r'$\alpha_i > \beta_i$' @@ -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:: @@ -130,7 +127,6 @@ Radicals -------- - Radicals can be produced with the ``\sqrt[]{}`` command. For example:: r'$\sqrt{2}$' @@ -153,7 +149,6 @@ Fonts ----- - The default font is *italics* for mathematical symbols. .. note:: @@ -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``, @@ -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. @@ -346,7 +339,6 @@ Symbols ------- - You can also use a large number of the TeX symbols, as in ``\infty``, ``\leftarrow``, ``\sum``, ``\int``. @@ -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