diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
new file mode 100644
index 000000000000..0342a41065a4
--- /dev/null
+++ b/.git-blame-ignore-revs
@@ -0,0 +1,8 @@
+# style: end-of-file-fixer pre-commit hook
+c1a33a481b9c2df605bcb9bef9c19fe65c3dac21
+
+# style: trailing-whitespace pre-commit hook
+213061c0804530d04bbbd5c259f10dc8504e5b2b
+
+# style: check-docstring-first pre-commit hook
+046533797725293dfc2a6edb9f536b25f08aa636
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index d2c2ba2c5b74..19e6aa1079b2 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -6,8 +6,8 @@ body:
id: summary
attributes:
label: Bug summary
- description: Describe the bug in 1-2 short sentences
- placeholder:
+ description: Describe the bug in 1-2 short sentences
+ placeholder:
value:
validations:
required: true
@@ -15,7 +15,7 @@ body:
id: reproduction
attributes:
label: Code for reproduction
- description: If possible, please provide a minimum self-contained example.
+ description: If possible, please provide a minimum self-contained example.
placeholder: Paste your code here
render: python
validations:
@@ -59,7 +59,7 @@ body:
required: true
- type: input
id: matplotlib-backend
- attributes:
+ attributes:
label: Matplotlib Backend
description: "From Python prompt: `import matplotlib; print(matplotlib.get_backend())`"
- type: input
diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml
index 1fecbab4c3c0..ea0eb385baaf 100644
--- a/.github/ISSUE_TEMPLATE/documentation.yml
+++ b/.github/ISSUE_TEMPLATE/documentation.yml
@@ -15,7 +15,7 @@ body:
id: problem
attributes:
label: Problem
- description: What is missing, unclear, or wrong in the documentation?
+ description: What is missing, unclear, or wrong in the documentation?
placeholder: |
* I found [...] to be unclear because [...]
* [...] made me think that [...] when really it should be [...]
diff --git a/.github/ISSUE_TEMPLATE/maintenance.yml b/.github/ISSUE_TEMPLATE/maintenance.yml
index eb2458dda6e8..746ab55ef0e3 100644
--- a/.github/ISSUE_TEMPLATE/maintenance.yml
+++ b/.github/ISSUE_TEMPLATE/maintenance.yml
@@ -7,11 +7,11 @@ body:
id: summary
attributes:
label: Summary
- description: Please provide 1-2 short sentences that succinctly describes what could be improved.
+ description: Please provide 1-2 short sentences that succinctly describes what could be improved.
validations:
required: true
- type: textarea
id: fix
attributes:
label: Proposed fix
- description: Please describe how you think this could be improved.
+ description: Please describe how you think this could be improved.
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 251f48b016ad..e1ce6122d4d2 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -305,4 +305,4 @@ jobs:
pinned: false
close-previous: false
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 0b1c80159857..dcfdb7209a5b 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -4,6 +4,7 @@ ci:
exclude: |
(?x)^(
extern|
+ LICENSE|
lib/matplotlib/mpl-data|
doc/devel/gitwash|
doc/users/prev|
@@ -12,7 +13,7 @@ exclude: |
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.0.1
+ rev: v4.2.0
hooks:
- id: check-added-large-files
- id: check-docstring-first
@@ -22,7 +23,7 @@ repos:
- id: trailing-whitespace
exclude_types: [svg]
- repo: https://github.com/pycqa/flake8
- rev: 3.9.2
+ rev: 4.0.1
hooks:
- id: flake8
additional_dependencies: [pydocstyle>5.1.0, flake8-docstrings>1.4.0]
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index f049ad177251..538e631e5a45 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -62,7 +62,7 @@ representative at an online or offline event.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
matplotlib@numfocus.org (monitored by Thomas Caswell (\@tacaswell) and Hannah
-Aizenman (\@story645)) or a report can be made using the [NumFOCUS Code of Conduct report form][numfocus form].
+Aizenman (\@story645)) or a report can be made using the [NumFOCUS Code of Conduct report form][numfocus form].
If community leaders cannot come to a resolution about enforcement, reports will be escalated to the NumFocus Code of Conduct committee (conduct@numfocus.org).
All complaints will be reviewed and investigated promptly and fairly.
diff --git a/README.rst b/README.rst
index 7c85c8202f96..c07329b14e14 100644
--- a/README.rst
+++ b/README.rst
@@ -116,4 +116,3 @@ For more information, please visit `the informational page
`__ or download the
`participant information sheet
`__.
-
diff --git a/doc/README.txt b/doc/README.txt
index a6dc1c3e6d97..0334a4ff1cdb 100644
--- a/doc/README.txt
+++ b/doc/README.txt
@@ -13,17 +13,17 @@ This is the top level build directory for the Matplotlib
documentation. All of the documentation is written using sphinx, a
python documentation system built on top of ReST. This directory contains
-* users - the user documentation, e.g., installation, plotting tutorials,
+* users - the user documentation, e.g., installation, plotting tutorials,
configuration tips, faq, explaations, etc.
* devel - documentation for Matplotlib developers
* api - placeholders to automatically generate the api documentation
-* tutorials, plot_types, and gallery - automatically
+* tutorials, plot_types, and gallery - automatically
generated by sphinx-gallery from ``../tutorials``, ``../plot_types``, and
``../examples`` respectively (these are only present if docs have been
-built locally).
+built locally).
* thirdpartypackages - redirect to
diff --git a/doc/_static/.gitignore b/doc/_static/.gitignore
index bbdc34458abc..162d7163fcfb 100644
--- a/doc/_static/.gitignore
+++ b/doc/_static/.gitignore
@@ -2,4 +2,3 @@ contour_frontpage.png
histogram_frontpage.png
membrane_frontpage.png
surface3d_frontpage.png
-
diff --git a/doc/_static/switcher.json b/doc/_static/switcher.json
index 8afc99995d56..90f6bc40c527 100644
--- a/doc/_static/switcher.json
+++ b/doc/_static/switcher.json
@@ -19,4 +19,4 @@
"name": "2.2",
"version": "2.2.4"
},
-]
\ No newline at end of file
+]
diff --git a/doc/_templates/automodule.rst b/doc/_templates/automodule.rst
index e9f2a755d413..984c12e00d03 100644
--- a/doc/_templates/automodule.rst
+++ b/doc/_templates/automodule.rst
@@ -5,7 +5,7 @@
treat this separately (sphinx-doc/sphinx/issues/4874)
.. automodule:: {{ fullname }}
:members:
-
+
{% else %}
.. automodule:: {{ fullname }}
@@ -18,7 +18,7 @@
Classes
-------
-.. autosummary::
+.. autosummary::
:template: autosummary.rst
:toctree:
{% for item in classes %}{% if item not in ['zip', 'map', 'reduce'] %}
@@ -32,7 +32,7 @@ Classes
Functions
---------
-.. autosummary::
+.. autosummary::
:template: autosummary.rst
:toctree:
diff --git a/doc/api/_enums_api.rst b/doc/api/_enums_api.rst
index c9e283305967..c38d535f3573 100644
--- a/doc/api/_enums_api.rst
+++ b/doc/api/_enums_api.rst
@@ -12,4 +12,3 @@
.. autoclass:: CapStyle
:members: demo
:exclude-members: butt, round, projecting, input_description
-
diff --git a/doc/api/lines_api.rst b/doc/api/lines_api.rst
index 808df726d118..4cde67c7e656 100644
--- a/doc/api/lines_api.rst
+++ b/doc/api/lines_api.rst
@@ -26,4 +26,3 @@ Functions
:template: autosummary.rst
segment_hits
-
\ No newline at end of file
diff --git a/doc/api/next_api_changes/behavior/00001-ABC.rst b/doc/api/next_api_changes/behavior/00001-ABC.rst
index 236f672c1123..d1e6fc066628 100644
--- a/doc/api/next_api_changes/behavior/00001-ABC.rst
+++ b/doc/api/next_api_changes/behavior/00001-ABC.rst
@@ -4,4 +4,4 @@ Behavior Change template
Enter description here....
Please rename file with PR number and your initials i.e. "99999-ABC.rst"
-and ``git add`` the new file.
+and ``git add`` the new file.
diff --git a/doc/api/next_api_changes/behavior/22639-RA.rst b/doc/api/next_api_changes/behavior/22639-RA.rst
index 3afdb2f0d05b..c6417e1633f1 100644
--- a/doc/api/next_api_changes/behavior/22639-RA.rst
+++ b/doc/api/next_api_changes/behavior/22639-RA.rst
@@ -2,4 +2,4 @@ MacOSX backend to use sRGB instead of GenericRGB colorspace
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MacOSX backend now display sRGB tagged image instead of GenericRGB which is
an older (now deprecated) Apple colorspace. This is the source colorspace
-used by ColorSync to convert to the current display profile.
\ No newline at end of file
+used by ColorSync to convert to the current display profile.
diff --git a/doc/api/next_api_changes/behavior/22691-JMK.rst b/doc/api/next_api_changes/behavior/22691-JMK.rst
index 24519d97e371..258af259bb89 100644
--- a/doc/api/next_api_changes/behavior/22691-JMK.rst
+++ b/doc/api/next_api_changes/behavior/22691-JMK.rst
@@ -3,4 +3,4 @@ QuadMesh mouseover defaults to False
New in 3.5, `.QuadMesh.get_cursor_data` allows display of data values
under the cursor. However, this can be very slow for large meshes, so
-by `.QuadMesh.set_mouseover` defaults to *False*.
\ No newline at end of file
+by `.QuadMesh.set_mouseover` defaults to *False*.
diff --git a/doc/api/next_api_changes/deprecations/22133-OG.rst b/doc/api/next_api_changes/deprecations/22133-OG.rst
index 71d86906a9d8..7a551d25ce0a 100644
--- a/doc/api/next_api_changes/deprecations/22133-OG.rst
+++ b/doc/api/next_api_changes/deprecations/22133-OG.rst
@@ -3,4 +3,4 @@
The modules ``matplotlib.AFM``, ``matplotlib.configfont_pattern``, and
``matplotlib.Type1Font`` are considered internal and public access is
-deprecated.
\ No newline at end of file
+deprecated.
diff --git a/doc/api/next_api_changes/deprecations/22134-OG.rst b/doc/api/next_api_changes/deprecations/22134-OG.rst
index a0f60a843239..fc68b4b7b473 100644
--- a/doc/api/next_api_changes/deprecations/22134-OG.rst
+++ b/doc/api/next_api_changes/deprecations/22134-OG.rst
@@ -2,4 +2,4 @@ Modules ``tight_bbox`` and ``tight_layout`` deprecated
------------------------------------------------------
The modules ``matplotlib.tight_bbox`` and ``matplotlib.tight_layout`` are
-considered internal and public access is deprecated.
\ No newline at end of file
+considered internal and public access is deprecated.
diff --git a/doc/api/next_api_changes/deprecations/22268-OG.rst b/doc/api/next_api_changes/deprecations/22268-OG.rst
index 929f20e5586c..79efe3783cea 100644
--- a/doc/api/next_api_changes/deprecations/22268-OG.rst
+++ b/doc/api/next_api_changes/deprecations/22268-OG.rst
@@ -7,4 +7,4 @@ is deprecated.
For ``is_close_to_int`` use ``math.isclose(x, round(x))`` instead.
For ``is_decade`` use
-``y = numpy.log(x)/numpy.log(base); numpy.isclose(y, numpy.round(y))``
\ No newline at end of file
+``y = numpy.log(x)/numpy.log(base); numpy.isclose(y, numpy.round(y))``
diff --git a/doc/api/next_api_changes/deprecations/22345-JK.rst b/doc/api/next_api_changes/deprecations/22345-JK.rst
index 337b09f37a50..003952fd705f 100644
--- a/doc/api/next_api_changes/deprecations/22345-JK.rst
+++ b/doc/api/next_api_changes/deprecations/22345-JK.rst
@@ -11,4 +11,4 @@ The methods `~.Figure.set_constrained_layout_pads` and
`~.Figure.get_constrained_layout_pads` are will be deprecated in favor of
``figure.get_layout_engine().set()`` and
``figure.get_layout_engine().get()``, and currently emit a
-``PendingDeprecationWarning``.
\ No newline at end of file
+``PendingDeprecationWarning``.
diff --git a/doc/api/next_api_changes/development/00001-ABC.rst b/doc/api/next_api_changes/development/00001-ABC.rst
index 4c60d3db185b..dba9c7b8acca 100644
--- a/doc/api/next_api_changes/development/00001-ABC.rst
+++ b/doc/api/next_api_changes/development/00001-ABC.rst
@@ -4,4 +4,4 @@ Development Change template
Enter description here....
Please rename file with PR number and your initials i.e. "99999-ABC.rst"
-and ``git add`` the new file.
+and ``git add`` the new file.
diff --git a/doc/api/next_api_changes/development/22205-ES.rst b/doc/api/next_api_changes/development/22205-ES.rst
index 1e500142c0ff..4ed8793cfaa9 100644
--- a/doc/api/next_api_changes/development/22205-ES.rst
+++ b/doc/api/next_api_changes/development/22205-ES.rst
@@ -13,4 +13,3 @@ being bumped:
This is consistent with our :ref:`min_deps_policy` and `NEP29
`__
-
diff --git a/doc/api/next_api_changes/removals/00001-ABC.rst b/doc/api/next_api_changes/removals/00001-ABC.rst
index 5c68eda9698a..f189bdeb861d 100644
--- a/doc/api/next_api_changes/removals/00001-ABC.rst
+++ b/doc/api/next_api_changes/removals/00001-ABC.rst
@@ -4,4 +4,4 @@ Removal Change template
Enter description of methods/classes removed here....
Please rename file with PR number and your initials i.e. "99999-ABC.rst"
-and ``git add`` the new file.
+and ``git add`` the new file.
diff --git a/doc/api/next_api_changes/removals/21980-CC.rst b/doc/api/next_api_changes/removals/21980-CC.rst
index 56d2a3460f4d..b95029b92a3e 100644
--- a/doc/api/next_api_changes/removals/21980-CC.rst
+++ b/doc/api/next_api_changes/removals/21980-CC.rst
@@ -2,5 +2,5 @@ Removed loaded modules logging
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The list of currently loaded modules is no longer logged at the DEBUG level at Matplotlib import time,
-because it can produce extensive output and make other valuable DEBUG statements difficult to find.
-If you were relying on this please arrange for your own logging (the built-in `sys.modules` can be used to get the currently loaded modules).
\ No newline at end of file
+because it can produce extensive output and make other valuable DEBUG statements difficult to find.
+If you were relying on this please arrange for your own logging (the built-in `sys.modules` can be used to get the currently loaded modules).
diff --git a/doc/api/next_api_changes/removals/22516-OG.rst b/doc/api/next_api_changes/removals/22516-OG.rst
index e115ab56a60e..32068fdcdf4b 100644
--- a/doc/api/next_api_changes/removals/22516-OG.rst
+++ b/doc/api/next_api_changes/removals/22516-OG.rst
@@ -17,4 +17,4 @@ be used as a replacement.
In the WX backend, the property ``IDLE_DELAY`` is removed. In addition, the
parameter ``origin`` of ``gui_repaint()`` is removed, as well as the method
-``get_canvas()``. No replacements are provided.
\ No newline at end of file
+``get_canvas()``. No replacements are provided.
diff --git a/doc/api/patches_api.rst b/doc/api/patches_api.rst
index 2c016f659cba..5b1eefa91971 100644
--- a/doc/api/patches_api.rst
+++ b/doc/api/patches_api.rst
@@ -48,4 +48,3 @@ Functions
bbox_artist
draw_bbox
-
diff --git a/doc/api/toolkits/mplot3d/faq.rst b/doc/api/toolkits/mplot3d/faq.rst
index dfc23b55e069..7e53cabc6e9a 100644
--- a/doc/api/toolkits/mplot3d/faq.rst
+++ b/doc/api/toolkits/mplot3d/faq.rst
@@ -49,4 +49,3 @@ Work is being done to eliminate this issue. For matplotlib v1.1.0, there is
a semi-official manner to modify these parameters. See the note in the
:mod:`.mplot3d.axis3d` section of the mplot3d API documentation for
more information.
-
diff --git a/doc/api/transformations.rst b/doc/api/transformations.rst
index 25d959801c28..186db9aea728 100644
--- a/doc/api/transformations.rst
+++ b/doc/api/transformations.rst
@@ -15,4 +15,3 @@
interval_contains, interval_contains_open
:show-inheritance:
:special-members:
-
diff --git a/doc/api/tri_api.rst b/doc/api/tri_api.rst
index 9205e34ff93b..fdf123c03908 100644
--- a/doc/api/tri_api.rst
+++ b/doc/api/tri_api.rst
@@ -17,7 +17,7 @@
:show-inheritance:
.. autoclass:: matplotlib.tri.TriInterpolator
-
+
.. autoclass:: matplotlib.tri.LinearTriInterpolator
:members: __call__, gradient
:show-inheritance:
@@ -30,7 +30,7 @@
.. autoclass:: matplotlib.tri.UniformTriRefiner
:show-inheritance:
- :members:
+ :members:
.. autoclass:: matplotlib.tri.TriAnalyzer
- :members:
+ :members:
diff --git a/doc/devel/contributing.rst b/doc/devel/contributing.rst
index 8e2845500ce3..57b255d34a52 100644
--- a/doc/devel/contributing.rst
+++ b/doc/devel/contributing.rst
@@ -40,15 +40,15 @@ difficulty. ``Difficulty: Easy`` is suited for people with little Python experie
``Difficulty: Medium`` and ``Difficulty: Hard`` are not trivial to solve and
require more thought and programming experience.
-In general, the Matplotlib project does not assign issues. Issues are
-"assigned" or "claimed" by opening a PR; there is no other assignment
-mechanism. If you have opened such a PR, please comment on the issue thread to
-avoid duplication of work. Please check if there is an existing PR for the
-issue you are addressing. If there is, try to work with the author by
-submitting reviews of their code or commenting on the PR rather than opening
-a new PR; duplicate PRs are subject to being closed. However, if the existing
-PR is an outline, unlikely to work, or stalled, and the original author is
-unresponsive, feel free to open a new PR referencing the old one.
+In general, the Matplotlib project does not assign issues. Issues are
+"assigned" or "claimed" by opening a PR; there is no other assignment
+mechanism. If you have opened such a PR, please comment on the issue thread to
+avoid duplication of work. Please check if there is an existing PR for the
+issue you are addressing. If there is, try to work with the author by
+submitting reviews of their code or commenting on the PR rather than opening
+a new PR; duplicate PRs are subject to being closed. However, if the existing
+PR is an outline, unlikely to work, or stalled, and the original author is
+unresponsive, feel free to open a new PR referencing the old one.
.. _submitting-a-bug-report:
diff --git a/doc/devel/development_setup.rst b/doc/devel/development_setup.rst
index c6aac3f1c467..3402af57b39d 100644
--- a/doc/devel/development_setup.rst
+++ b/doc/devel/development_setup.rst
@@ -67,9 +67,18 @@ These will automatically check flake8 and other style issues when you run
``git commit``. The hooks are defined in the top level
``.pre-commit-config.yaml`` file. To install the hooks ::
- pip install pre-commit
+ python -m pip install pre-commit
pre-commit install
+The hooks can also be run manually. All the hooks can be run, in order as
+listed in ``.pre-commit-config.yaml``, against the full codebase with ::
+
+ pre-commit run --all-files
+
+To run a particular hook manually, run ``pre-commit run`` with the hook id ::
+
+ pre-commit run --all-files
+
Installing additional dependencies for development
==================================================
See :ref:`development-dependencies`.
diff --git a/doc/devel/style_guide.rst b/doc/devel/style_guide.rst
index 65779e18a734..342875674602 100644
--- a/doc/devel/style_guide.rst
+++ b/doc/devel/style_guide.rst
@@ -406,4 +406,3 @@ resources contain common best practices for writing documentation.
* `Google Developer Style Guide `_
* `IBM Style Guide `_
* `Red Hat Style Guide `_
-
diff --git a/doc/devel/testing.rst b/doc/devel/testing.rst
index dd98c7a6970a..13a6261b59e1 100644
--- a/doc/devel/testing.rst
+++ b/doc/devel/testing.rst
@@ -256,4 +256,3 @@ The test discovery scope can be narrowed to single test modules or even single
functions::
python -m pytest --pyargs matplotlib.tests.test_simplification.py::test_clipping
-
diff --git a/doc/missing-references.json b/doc/missing-references.json
index 10088ba0e7a3..52ffa65805b1 100644
--- a/doc/missing-references.json
+++ b/doc/missing-references.json
@@ -1107,4 +1107,4 @@
"lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.get_ylim3d:24"
]
}
-}
\ No newline at end of file
+}
diff --git a/doc/users/explain/fonts.rst b/doc/users/explain/fonts.rst
index 9bf2bbc26a2d..8a69dca7feeb 100644
--- a/doc/users/explain/fonts.rst
+++ b/doc/users/explain/fonts.rst
@@ -1,5 +1,5 @@
.. redirect-from:: /users/fonts
-
+
Fonts in Matplotlib text engine
===============================
diff --git a/doc/users/faq/index.rst b/doc/users/faq/index.rst
index 124b1a7f561a..636c90904aba 100644
--- a/doc/users/faq/index.rst
+++ b/doc/users/faq/index.rst
@@ -3,7 +3,7 @@
.. redirect-from:: /faq/index
##########################
-How-to and troubleshooting
+How-to and troubleshooting
##########################
.. only:: html
diff --git a/doc/users/github_stats.rst b/doc/users/github_stats.rst
index ba3ecf90fb78..1da50e93c79e 100644
--- a/doc/users/github_stats.rst
+++ b/doc/users/github_stats.rst
@@ -45,7 +45,7 @@ Pull Requests (84):
* :ghpull:`21908`: Backport PR #21834 on branch v3.5.x (MAINT Fix signature qhull version function )
* :ghpull:`21907`: Backport PR #21905 on branch v3.5.x (Fix image testing decorator in pytest importlib mode)
* :ghpull:`21906`: Backport PR #21773 on branch v3.5.x (FIX: Reset label of axis to center)
-* :ghpull:`21834`: MAINT Fix signature qhull version function
+* :ghpull:`21834`: MAINT Fix signature qhull version function
* :ghpull:`21905`: Fix image testing decorator in pytest importlib mode
* :ghpull:`21773`: FIX: Reset label of axis to center
* :ghpull:`21902`: Backport PR #21884 on branch v3.5.x (FIX: be more careful about coercing unit-full containers to ndarray)
diff --git a/doc/users/index.rst b/doc/users/index.rst
index 9f913737af52..0ecff14c9a23 100644
--- a/doc/users/index.rst
+++ b/doc/users/index.rst
@@ -29,7 +29,7 @@ Tutorials and examples
../tutorials/index.rst
../gallery/index.rst
-Reference
+Reference
#########
.. toctree::
diff --git a/doc/users/next_whats_new/3d_plot_roll_angle.rst b/doc/users/next_whats_new/3d_plot_roll_angle.rst
index 5ebb38a2ff16..c594c9a5a79d 100644
--- a/doc/users/next_whats_new/3d_plot_roll_angle.rst
+++ b/doc/users/next_whats_new/3d_plot_roll_angle.rst
@@ -10,7 +10,7 @@ existing 3D plots.
.. plot::
:include-source: true
-
+
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
fig = plt.figure()
diff --git a/doc/users/next_whats_new/extending_MarkerStyle.rst b/doc/users/next_whats_new/extending_MarkerStyle.rst
index 6e970d0738fe..f31585a70b1c 100644
--- a/doc/users/next_whats_new/extending_MarkerStyle.rst
+++ b/doc/users/next_whats_new/extending_MarkerStyle.rst
@@ -6,7 +6,7 @@ the user to supply a transformation to be applied to the marker (e.g. a rotation
.. plot::
:include-source: true
-
+
import matplotlib.pyplot as plt
from matplotlib.markers import MarkerStyle
from matplotlib.transforms import Affine2D
diff --git a/doc/users/next_whats_new/inset_axes_improvements.rst b/doc/users/next_whats_new/inset_axes_improvements.rst
index 8ff7d82cfb28..72d3d9e9361c 100644
--- a/doc/users/next_whats_new/inset_axes_improvements.rst
+++ b/doc/users/next_whats_new/inset_axes_improvements.rst
@@ -3,4 +3,4 @@ Axes.inset_axes Flexibility
`matplotlib.axes.Axes.inset_axes` now accepts the *projection*, *polar* and
*axes_class* keyword arguments, so that subclasses of `matplotlib.axes.Axes` may
-be returned.
\ No newline at end of file
+be returned.
diff --git a/doc/users/next_whats_new/layout_engine.rst b/doc/users/next_whats_new/layout_engine.rst
index d4f6a752d69e..9304ee9771e0 100644
--- a/doc/users/next_whats_new/layout_engine.rst
+++ b/doc/users/next_whats_new/layout_engine.rst
@@ -4,4 +4,4 @@ New ``layout_engine`` module
Matplotlib ships with ``tight_layout`` and ``constrained_layout`` layout
engines. A new ``layout_engine`` module is provided to allow downstream
libraries to write their own layout engines and `~.figure.Figure` objects can
-now take a `.LayoutEngine` subclass as an argument to the *layout* parameter.
\ No newline at end of file
+now take a `.LayoutEngine` subclass as an argument to the *layout* parameter.
diff --git a/doc/users/next_whats_new/list_font_names.rst b/doc/users/next_whats_new/list_font_names.rst
index e201b2fbbefc..d3737cd8ba55 100644
--- a/doc/users/next_whats_new/list_font_names.rst
+++ b/doc/users/next_whats_new/list_font_names.rst
@@ -7,4 +7,4 @@ available font names in matplotlib with:
.. code-block:: python
from matplotlib import font_manager
- font_manager.get_font_names()
\ No newline at end of file
+ font_manager.get_font_names()
diff --git a/doc/users/next_whats_new/modify_stairs_fill_edge_behaviour.rst b/doc/users/next_whats_new/modify_stairs_fill_edge_behaviour.rst
index 17ba718750d5..1dc24a20907a 100644
--- a/doc/users/next_whats_new/modify_stairs_fill_edge_behaviour.rst
+++ b/doc/users/next_whats_new/modify_stairs_fill_edge_behaviour.rst
@@ -1,9 +1,9 @@
stairs(..., fill=True) to hide patch edge by setting lw=0
---------------------------------------------------------
-``stairs(..., fill=True)`` would previously hide Patch
+``stairs(..., fill=True)`` would previously hide Patch
edge by setting edgecolor="none". Calling ``set_color()``
-on the Patch after would make the Patch appear larger.
-Updated treatment prevents this. Likewise calling
-``stairs(..., fill=True, lw=3)`` will behave more
-transparently.
\ No newline at end of file
+on the Patch after would make the Patch appear larger.
+Updated treatment prevents this. Likewise calling
+``stairs(..., fill=True, lw=3)`` will behave more
+transparently.
diff --git a/doc/users/next_whats_new/windows_arm64.rst b/doc/users/next_whats_new/windows_arm64.rst
index dcaf0e3b618a..fea1a90e896a 100644
--- a/doc/users/next_whats_new/windows_arm64.rst
+++ b/doc/users/next_whats_new/windows_arm64.rst
@@ -5,4 +5,4 @@ Preliminary support for windows on arm64 target added.
Matplotlib for windows/arm64 requires FreeType 2.11 or above.
-No binary wheels are available yet but can be built from source.
\ No newline at end of file
+No binary wheels are available yet but can be built from source.
diff --git a/doc/users/resources/index.rst b/doc/users/resources/index.rst
index 262eb7def9bb..30c275766b2b 100644
--- a/doc/users/resources/index.rst
+++ b/doc/users/resources/index.rst
@@ -70,7 +70,7 @@ Tutorials
* `The Python Graph Gallery `_
by Yan Holtz
-
+
* `Matplotlib tutorial `_
by Nicolas P. Rougier
diff --git a/examples/event_handling/README.txt b/examples/event_handling/README.txt
index a4c4b6524658..46aed29b56bc 100644
--- a/examples/event_handling/README.txt
+++ b/examples/event_handling/README.txt
@@ -3,11 +3,11 @@
Event handling
==============
-Matplotlib supports :doc:`event handling` with
-a GUI neutral event model, so you can connect to Matplotlib events without
-knowledge of what user interface Matplotlib will ultimately be plugged in to.
-This has two advantages: the code you write will be more portable, and
-Matplotlib events are aware of things like data coordinate space and which
-axes the event occurs in so you don't have to mess with low level
-transformation details to go from canvas space to data space. Object picking
+Matplotlib supports :doc:`event handling` with
+a GUI neutral event model, so you can connect to Matplotlib events without
+knowledge of what user interface Matplotlib will ultimately be plugged in to.
+This has two advantages: the code you write will be more portable, and
+Matplotlib events are aware of things like data coordinate space and which
+axes the event occurs in so you don't have to mess with low level
+transformation details to go from canvas space to data space. Object picking
examples are also included.
diff --git a/lib/matplotlib/_constrained_layout.py b/lib/matplotlib/_constrained_layout.py
index 891b1ca8b065..72fc7e71c379 100644
--- a/lib/matplotlib/_constrained_layout.py
+++ b/lib/matplotlib/_constrained_layout.py
@@ -11,21 +11,7 @@
layout. Axes manually placed via ``figure.add_axes()`` will not.
See Tutorial: :doc:`/tutorials/intermediate/constrainedlayout_guide`
-"""
-
-import logging
-
-import numpy as np
-
-from matplotlib import _api, artist as martist
-from matplotlib._tight_layout import get_renderer
-import matplotlib.transforms as mtransforms
-import matplotlib._layoutgrid as mlayoutgrid
-
-
-_log = logging.getLogger(__name__)
-"""
General idea:
-------------
@@ -61,6 +47,18 @@
for more discussion of the algorithm with examples.
"""
+import logging
+
+import numpy as np
+
+from matplotlib import _api, artist as martist
+from matplotlib._tight_layout import get_renderer
+import matplotlib.transforms as mtransforms
+import matplotlib._layoutgrid as mlayoutgrid
+
+
+_log = logging.getLogger(__name__)
+
######################################################
def do_constrained_layout(fig, h_pad, w_pad,
diff --git a/lib/matplotlib/backend_tools.py b/lib/matplotlib/backend_tools.py
index e397fb7fc456..897c9f1a7d51 100644
--- a/lib/matplotlib/backend_tools.py
+++ b/lib/matplotlib/backend_tools.py
@@ -989,12 +989,10 @@ def trigger(self, *args, **kwargs):
'help': ToolHelpBase,
'copy': ToolCopyToClipboardBase,
}
-"""Default tools"""
default_toolbar_tools = [['navigation', ['home', 'back', 'forward']],
['zoompan', ['pan', 'zoom', 'subplots']],
['io', ['save', 'help']]]
-"""Default tools in the toolbar"""
def add_tools_to_manager(toolmanager, tools=default_tools):
diff --git a/lib/matplotlib/backends/web_backend/css/fbm.css b/lib/matplotlib/backends/web_backend/css/fbm.css
index 4c6236fb58c7..ce35d99a5e64 100644
--- a/lib/matplotlib/backends/web_backend/css/fbm.css
+++ b/lib/matplotlib/backends/web_backend/css/fbm.css
@@ -1,95 +1,95 @@
/* Flexible box model classes */
/* Taken from Alex Russell https://infrequently.org/2009/08/css-3-progress/ */
-
+
.hbox {
display: -webkit-box;
-webkit-box-orient: horizontal;
-webkit-box-align: stretch;
-
+
display: -moz-box;
-moz-box-orient: horizontal;
-moz-box-align: stretch;
-
+
display: box;
box-orient: horizontal;
box-align: stretch;
}
-
+
.hbox > * {
-webkit-box-flex: 0;
-moz-box-flex: 0;
box-flex: 0;
}
-
+
.vbox {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-align: stretch;
-
+
display: -moz-box;
-moz-box-orient: vertical;
-moz-box-align: stretch;
-
+
display: box;
box-orient: vertical;
box-align: stretch;
}
-
+
.vbox > * {
-webkit-box-flex: 0;
-moz-box-flex: 0;
box-flex: 0;
}
-
+
.reverse {
-webkit-box-direction: reverse;
-moz-box-direction: reverse;
box-direction: reverse;
}
-
+
.box-flex0 {
-webkit-box-flex: 0;
-moz-box-flex: 0;
box-flex: 0;
}
-
+
.box-flex1, .box-flex {
-webkit-box-flex: 1;
-moz-box-flex: 1;
box-flex: 1;
}
-
+
.box-flex2 {
-webkit-box-flex: 2;
-moz-box-flex: 2;
box-flex: 2;
}
-
+
.box-group1 {
-webkit-box-flex-group: 1;
-moz-box-flex-group: 1;
box-flex-group: 1;
}
-
+
.box-group2 {
-webkit-box-flex-group: 2;
-moz-box-flex-group: 2;
box-flex-group: 2;
}
-
+
.start {
-webkit-box-pack: start;
-moz-box-pack: start;
box-pack: start;
}
-
+
.end {
-webkit-box-pack: end;
-moz-box-pack: end;
box-pack: end;
}
-
+
.center {
-webkit-box-pack: center;
-moz-box-pack: center;
diff --git a/lib/matplotlib/backends/web_backend/css/page.css b/lib/matplotlib/backends/web_backend/css/page.css
index c380ef0a3ffc..ded0d9220379 100644
--- a/lib/matplotlib/backends/web_backend/css/page.css
+++ b/lib/matplotlib/backends/web_backend/css/page.css
@@ -80,4 +80,3 @@ span#login_widget {
margin: 10px;
vertical-align: top;
}
-
diff --git a/lib/matplotlib/dates.py b/lib/matplotlib/dates.py
index ad883130067f..4d8ddf3ee50b 100644
--- a/lib/matplotlib/dates.py
+++ b/lib/matplotlib/dates.py
@@ -222,9 +222,7 @@ def _get_tzinfo(tz=None):
raise TypeError("tz must be string or tzinfo subclass.")
-"""
-Time-related constants.
-"""
+# Time-related constants.
EPOCH_OFFSET = float(datetime.datetime(1970, 1, 1).toordinal())
# EPOCH_OFFSET is not used by matplotlib
JULIAN_OFFSET = 1721424.5 # Julian date at 0000-12-31
diff --git a/lib/matplotlib/tests/README b/lib/matplotlib/tests/README
index 4d8f6e3c30d2..0613afcc85a3 100644
--- a/lib/matplotlib/tests/README
+++ b/lib/matplotlib/tests/README
@@ -6,4 +6,3 @@ the Testing section of the Matplotlib Developers’ Guide:
* https://matplotlib.org/devel/testing.html
* /doc/devel/coding_guide.rst (equivalent, but in reST format)
-
diff --git a/plot_types/README.rst b/plot_types/README.rst
index c6a52eb489fa..ef5b08fbedbe 100644
--- a/plot_types/README.rst
+++ b/plot_types/README.rst
@@ -9,4 +9,4 @@ Overview of many common plotting commands in Matplotlib.
Note that we have stripped all labels, but they are present by default.
See the `gallery <../gallery/index.html>`_ for many more examples and
-the `tutorials page <../tutorials/index.html>`_ for longer examples.
\ No newline at end of file
+the `tutorials page <../tutorials/index.html>`_ for longer examples.
diff --git a/plot_types/arrays/README.rst b/plot_types/arrays/README.rst
index 1e9c2590c36e..43844ee9490c 100644
--- a/plot_types/arrays/README.rst
+++ b/plot_types/arrays/README.rst
@@ -3,4 +3,4 @@
Plots of arrays and fields
--------------------------
-Plotting for arrays of data ``Z(x, y)`` and fields ``U(x, y), V(x, y)``.
\ No newline at end of file
+Plotting for arrays of data ``Z(x, y)`` and fields ``U(x, y), V(x, y)``.
diff --git a/plot_types/basic/README.rst b/plot_types/basic/README.rst
index 7ad8b4692ec6..9ce35d083177 100644
--- a/plot_types/basic/README.rst
+++ b/plot_types/basic/README.rst
@@ -3,4 +3,4 @@
Basic
-----
-Basic plot types, usually y versus x.
\ No newline at end of file
+Basic plot types, usually y versus x.
diff --git a/plot_types/stats/README.rst b/plot_types/stats/README.rst
index 9944c77acccc..b2ca855aafbc 100644
--- a/plot_types/stats/README.rst
+++ b/plot_types/stats/README.rst
@@ -3,4 +3,4 @@
Statistics plots
----------------
-Plots for statistical analysis.
\ No newline at end of file
+Plots for statistical analysis.
diff --git a/plot_types/unstructured/README.rst b/plot_types/unstructured/README.rst
index 0f0a04d28913..89b7844775d2 100644
--- a/plot_types/unstructured/README.rst
+++ b/plot_types/unstructured/README.rst
@@ -4,6 +4,6 @@ Unstructured coordinates
-------------------------
Sometimes we collect data ``z`` at coordinates ``(x,y)`` and want to visualize
-as a contour. Instead of gridding the data and then using
-`~.axes.Axes.contour`, we can use a triangulation algorithm and fill the
-triangles.
\ No newline at end of file
+as a contour. Instead of gridding the data and then using
+`~.axes.Axes.contour`, we can use a triangulation algorithm and fill the
+triangles.
diff --git a/src/_backend_agg.h b/src/_backend_agg.h
index 0cd76618e26d..8f175b18f0bf 100644
--- a/src/_backend_agg.h
+++ b/src/_backend_agg.h
@@ -43,7 +43,7 @@
/**********************************************************************/
-// a helper class to pass agg::buffer objects around.
+// a helper class to pass agg::buffer objects around.
class BufferRegion
{