Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Pre-commit config + fixes #21638

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

Closed
wants to merge 3 commits into from
Closed
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
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ 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
- type: textarea
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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [...]
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
29 changes: 29 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ci:
autofix_prs: false
autoupdate_schedule: 'quarterly'
exclude: |
(?x)^(
extern|
lib/matplotlib/mpl-data|
doc/devel/gitwash|
doc/users/prev|
doc/api/prev|
lib/matplotlib/tests/tinypages
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-added-large-files
- id: check-docstring-first
- id: end-of-file-fixer
exclude_types: [svg]
- id: mixed-line-ending
- id: trailing-whitespace
exclude_types: [svg]
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies: [pydocstyle>5.1.0, flake8-docstrings>1.4.0]
args: ["--docstring-convention=all"]
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
[email protected] (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 ([email protected]).
All complaints will be reviewed and investigated promptly and fairly.

Expand Down
2 changes: 1 addition & 1 deletion LICENSE/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ products or services of Licensee, or any third party.

8. By copying, installing or otherwise using matplotlib,
Licensee agrees to be bound by the terms and conditions of this License
Agreement.
Agreement.
2 changes: 1 addition & 1 deletion LICENSE/LICENSE_AMSFONTS
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
Expand Down
17 changes: 8 additions & 9 deletions LICENSE/LICENSE_BAKOMA
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@

2) BaKoMa-AMS (1.2/19-Jan-95)
AMS TeX fonts in PostScript Type 1 and TrueType font formats.

Copyright (C) 1994, 1995, Basil K. Malyshev. All Rights Reserved.

Permission to copy and distribute these fonts for any purpose is
hereby granted without fee, provided that the above copyright notice,
author statement and this permission notice appear in all copies of
Permission to copy and distribute these fonts for any purpose is
hereby granted without fee, provided that the above copyright notice,
author statement and this permission notice appear in all copies of
these fonts and related documentation.

Permission to modify and distribute modified fonts for any purpose is
hereby granted without fee, provided that the copyright notice,
author statement, this permission notice and location of original
Permission to modify and distribute modified fonts for any purpose is
hereby granted without fee, provided that the copyright notice,
author statement, this permission notice and location of original
fonts (http://www.ctan.org/tex-archive/fonts/cm/ps-type1/bakoma)
appear in all copies of modified fonts and related documentation.

Permission to use these fonts (embedding into PostScript, PDF, SVG
and printing by using any software) is hereby granted without fee.
and printing by using any software) is hereby granted without fee.
It is not required to provide any notices about using these fonts.

Basil K. Malyshev
Expand All @@ -37,4 +37,3 @@

E-Mail: [email protected]
or [email protected]

2 changes: 1 addition & 1 deletion LICENSE/LICENSE_CARLOGO
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ TERMINATION
This license becomes null and void if any of the above conditions are not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
46 changes: 23 additions & 23 deletions LICENSE/LICENSE_COLORBREWER
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@ Apache-Style Software License for ColorBrewer Color Schemes

Version 1.1

Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The Pennsylvania
State University. All rights reserved. Redistribution and use in source
and binary forms, with or without modification, are permitted provided
Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The Pennsylvania
State University. All rights reserved. Redistribution and use in source
and binary forms, with or without modification, are permitted provided
that the following conditions are met:

1. Redistributions as source code must retain the above copyright notice,
1. Redistributions as source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. The end-user documentation included with the redistribution, if any,
must include the following acknowledgment: "This product includes color
specifications and designs developed by Cynthia Brewer
(http://colorbrewer.org/)." Alternately, this acknowledgment may appear in
the software itself, if and wherever such third-party acknowledgments
2. The end-user documentation included with the redistribution, if any,
must include the following acknowledgment: "This product includes color
specifications and designs developed by Cynthia Brewer
(http://colorbrewer.org/)." Alternately, this acknowledgment may appear in
the software itself, if and wherever such third-party acknowledgments
normally appear.

3. The name "ColorBrewer" must not be used to endorse or promote products
derived from this software without prior written permission. For written
3. The name "ColorBrewer" must not be used to endorse or promote products
derived from this software without prior written permission. For written
permission, please contact Cynthia Brewer at [email protected].

4. Products derived from this software may not be called "ColorBrewer",
nor may "ColorBrewer" appear in their name, without prior written
4. Products derived from this software may not be called "ColorBrewer",
nor may "ColorBrewer" appear in their name, without prior written
permission of Cynthia Brewer.

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
CYNTHIA BREWER, MARK HARROWER, OR THE PENNSYLVANIA STATE UNIVERSITY BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
CYNTHIA BREWER, MARK HARROWER, OR THE PENNSYLVANIA STATE UNIVERSITY BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
1 change: 0 additions & 1 deletion LICENSE/LICENSE_COURIERTEN
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ is acknowledged as shown below on all unmodified copies of the 4 Charter
Type 1 fonts.

BITSTREAM CHARTER is a registered trademark of Bitstream Inc.

99 changes: 49 additions & 50 deletions LICENSE/LICENSE_STIX
Original file line number Diff line number Diff line change
@@ -1,71 +1,70 @@
TERMS AND CONDITIONS

1. Permission is hereby granted, free of charge, to any person
obtaining a copy of the STIX Fonts-TM set accompanying this license
(collectively, the "Fonts") and the associated documentation files
(collectively with the Fonts, the "Font Software"), to reproduce and
distribute the Font Software, including the rights to use, copy, merge
and publish copies of the Font Software, and to permit persons to whom
the Font Software is furnished to do so same, subject to the following
1. Permission is hereby granted, free of charge, to any person
obtaining a copy of the STIX Fonts-TM set accompanying this license
(collectively, the "Fonts") and the associated documentation files
(collectively with the Fonts, the "Font Software"), to reproduce and
distribute the Font Software, including the rights to use, copy, merge
and publish copies of the Font Software, and to permit persons to whom
the Font Software is furnished to do so same, subject to the following
terms and conditions (the "License").

2. The following copyright and trademark notice and these Terms and
Conditions shall be included in all copies of one or more of the Font
typefaces and any derivative work created as permitted under this
2. The following copyright and trademark notice and these Terms and
Conditions shall be included in all copies of one or more of the Font
typefaces and any derivative work created as permitted under this
License:

Copyright (c) 2001-2005 by the STI Pub Companies, consisting of
the American Institute of Physics, the American Chemical Society, the
American Mathematical Society, the American Physical Society, Elsevier,
Inc., and The Institute of Electrical and Electronic Engineers, Inc.
Portions copyright (c) 1998-2003 by MicroPress, Inc. Portions copyright
(c) 1990 by Elsevier, Inc. All rights reserved. STIX Fonts-TM is a
Copyright (c) 2001-2005 by the STI Pub Companies, consisting of
the American Institute of Physics, the American Chemical Society, the
American Mathematical Society, the American Physical Society, Elsevier,
Inc., and The Institute of Electrical and Electronic Engineers, Inc.
Portions copyright (c) 1998-2003 by MicroPress, Inc. Portions copyright
(c) 1990 by Elsevier, Inc. All rights reserved. STIX Fonts-TM is a
trademark of The Institute of Electrical and Electronics Engineers, Inc.

3. You may (a) convert the Fonts from one format to another (e.g.,
from TrueType to PostScript), in which case the normal and reasonable
distortion that occurs during such conversion shall be permitted and (b)
embed or include a subset of the Fonts in a document for the purposes of
allowing users to read text in the document that utilizes the Fonts. In
each case, you may use the STIX Fonts-TM mark to designate the resulting
3. You may (a) convert the Fonts from one format to another (e.g.,
from TrueType to PostScript), in which case the normal and reasonable
distortion that occurs during such conversion shall be permitted and (b)
embed or include a subset of the Fonts in a document for the purposes of
allowing users to read text in the document that utilizes the Fonts. In
each case, you may use the STIX Fonts-TM mark to designate the resulting
Fonts or subset of the Fonts.

4. You may also (a) add glyphs or characters to the Fonts, or modify
the shape of existing glyphs, so long as the base set of glyphs is not
removed and (b) delete glyphs or characters from the Fonts, provided
that the resulting font set is distributed with the following
disclaimer: "This [name] font does not include all the Unicode points
covered in the STIX Fonts-TM set but may include others." In each case,
the name used to denote the resulting font set shall not include the
4. You may also (a) add glyphs or characters to the Fonts, or modify
the shape of existing glyphs, so long as the base set of glyphs is not
removed and (b) delete glyphs or characters from the Fonts, provided
that the resulting font set is distributed with the following
disclaimer: "This [name] font does not include all the Unicode points
covered in the STIX Fonts-TM set but may include others." In each case,
the name used to denote the resulting font set shall not include the
term "STIX" or any similar term.

5. You may charge a fee in connection with the distribution of the
Font Software, provided that no copy of one or more of the individual
5. You may charge a fee in connection with the distribution of the
Font Software, provided that no copy of one or more of the individual
Font typefaces that form the STIX Fonts-TM set may be sold by itself.

6. THE FONT SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK OR OTHER RIGHT. IN NO EVENT SHALL
MICROPRESS OR ANY OF THE STI PUB COMPANIES BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, INCLUDING, BUT NOT LIMITED TO, ANY GENERAL,
SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM OR OUT OF THE USE OR
INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT
6. THE FONT SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK OR OTHER RIGHT. IN NO EVENT SHALL
MICROPRESS OR ANY OF THE STI PUB COMPANIES BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, INCLUDING, BUT NOT LIMITED TO, ANY GENERAL,
SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM OR OUT OF THE USE OR
INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT
SOFTWARE.

7. Except as contained in the notice set forth in Section 2, the
names MicroPress Inc. and STI Pub Companies, as well as the names of the
companies/organizations that compose the STI Pub Companies, shall not be
used in advertising or otherwise to promote the sale, use or other
dealings in the Font Software without the prior written consent of the
7. Except as contained in the notice set forth in Section 2, the
names MicroPress Inc. and STI Pub Companies, as well as the names of the
companies/organizations that compose the STI Pub Companies, shall not be
used in advertising or otherwise to promote the sale, use or other
dealings in the Font Software without the prior written consent of the
respective company or organization.

8. This License shall become null and void in the event of any
8. This License shall become null and void in the event of any
material breach of the Terms and Conditions herein by licensee.

9. A substantial portion of the STIX Fonts set was developed by
MicroPress Inc. for the STI Pub Companies. To obtain additional
mathematical fonts, please contact MicroPress, Inc., 68-30 Harrow
9. A substantial portion of the STIX Fonts set was developed by
MicroPress Inc. for the STI Pub Companies. To obtain additional
mathematical fonts, please contact MicroPress, Inc., 68-30 Harrow
Street, Forest Hills, NY 11375, USA - Phone: (718) 575-1816.

1 change: 0 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,3 @@ For more information, please visit `the informational page
<https://sustainable-open-science-and-software.github.io/>`__ or download the
`participant information sheet
<https://sustainable-open-science-and-software.github.io/assets/PIS_sustainable_software.pdf>`__.

6 changes: 3 additions & 3 deletions doc/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://matplotlib.org/mpl-third-party/>

Expand Down
1 change: 0 additions & 1 deletion doc/_static/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ contour_frontpage.png
histogram_frontpage.png
membrane_frontpage.png
surface3d_frontpage.png

6 changes: 3 additions & 3 deletions doc/_templates/automodule.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
treat this separately (sphinx-doc/sphinx/issues/4874)
.. automodule:: {{ fullname }}
:members:

{% else %}

.. automodule:: {{ fullname }}
Expand All @@ -18,7 +18,7 @@
Classes
-------

.. autosummary::
.. autosummary::
:template: autosummary.rst
:toctree:
{% for item in classes %}{% if item not in ['zip', 'map', 'reduce'] %}
Expand All @@ -32,7 +32,7 @@ Classes
Functions
---------

.. autosummary::
.. autosummary::
:template: autosummary.rst
:toctree:

Expand Down
1 change: 0 additions & 1 deletion doc/api/_enums_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@
.. autoclass:: CapStyle
:members: demo
:exclude-members: butt, round, projecting, input_description

Loading