Skip to content

Commit cd75119

Browse files
committed
Merge branch 'main' into nanobind-experiment
2 parents ccc9d81 + 825479c commit cd75119

16 files changed

Lines changed: 88 additions & 41 deletions

File tree

‎.github/workflows/pr_welcome.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ jobs:
6060
scan-pull-requests: true
6161
scan-issues: true
6262
allowed-users: "meeseeksmachine"
63-
label-mixed: "automation: mixed"
64-
label-automated: "automation: automated"
65-
label-community-flagged: "automation: flagged"
63+
label-mixed: "AgentScan: mixed"
64+
label-automation: "AgentScan: automated"
65+
label-community-flagged: "AgentScan: flagged"
6666
auto-close: false
6767
honeypot: false

‎.pre-commit-config.yaml‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ repos:
4949
# Run the linter.
5050
- id: ruff-check
5151
args: [--fix, --show-fixes]
52+
# Sort imports in the galleries, mirroring the previous isort scope.
53+
- id: ruff-check
54+
name: ruff isort (galleries)
55+
args: [--fix, --show-fixes, --select=I001]
56+
files: ^galleries/tutorials/|^galleries/examples/|^galleries/plot_types/
5257
- repo: https://github.com/codespell-project/codespell
5358
rev: 2ccb47ff45ad361a21071a7eedda4c37e6ae8c5a # frozen: v2.4.2
5459
hooks:
@@ -59,12 +64,6 @@ repos:
5964
- "ci/codespell-ignore-words.txt"
6065
- "--skip"
6166
- "doc/project/credits.rst"
62-
- repo: https://github.com/pycqa/isort
63-
rev: a333737ed43df02b18e6c95477ea1b285b3de15a # frozen: 8.0.1
64-
hooks:
65-
- id: isort
66-
name: isort (python)
67-
files: ^galleries/tutorials/|^galleries/examples/|^galleries/plot_types/
6867
- repo: https://github.com/rstcheck/rstcheck
6968
rev: d8774e96810795967ed9603f445b4e751e7b313f # frozen: v6.3.0
7069
hooks:

‎doc/devel/development_setup.rst‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,20 +321,23 @@ you are aware of the existing issues beforehand.
321321

322322
.. _pre-commit-hooks:
323323

324-
Install pre-commit hooks
325-
========================
324+
Install git pre-commit hooks
325+
============================
326+
326327
`prek <https://prek.j178.dev/>`_ hooks save time in the review process by
327328
identifying issues with the code before a pull request is formally opened. Most
328329
hooks can also aide in fixing the errors, and the checks should have
329330
corresponding :ref:`development workflow <development-workflow>` and
330331
:ref:`pull request <pr-guidelines>` guidelines. Hooks are configured in
331332
`.pre-commit-config.yaml <https://github.com/matplotlib/matplotlib/blob/main/.pre-commit-config.yaml?>`_
332-
and include checks for spelling and formatting, flake 8 conformity, accidentally
333+
and include checks for spelling and formatting, style conformity, accidentally
333334
committed files, import order, and incorrect branching.
334335

335336
Install pre-commit hooks ::
336337

337-
python -m pip install prek
338+
# e.g.
339+
# pixi global install prek
340+
# uv tool install prek
338341
prek install
339342

340343
Hooks are run automatically after the ``git commit`` stage of the

‎galleries/examples/images_contours_and_fields/image_transparency_blend.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"""
1717

1818
import matplotlib.pyplot as plt
19+
1920
# sphinx_gallery_thumbnail_number = 3
2021
import numpy as np
2122

‎galleries/examples/misc/anchored_artists.py‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@
1717

1818
from matplotlib import pyplot as plt
1919
from matplotlib.lines import Line2D
20-
from matplotlib.offsetbox import (AnchoredOffsetbox, AuxTransformBox, DrawingArea,
21-
TextArea, VPacker)
20+
from matplotlib.offsetbox import (
21+
AnchoredOffsetbox,
22+
AuxTransformBox,
23+
DrawingArea,
24+
TextArea,
25+
VPacker,
26+
)
2227
from matplotlib.patches import Circle, Ellipse
2328

2429

‎galleries/examples/subplots_axes_and_figures/axes_zoom_effect.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
import matplotlib.pyplot as plt
99

1010
from matplotlib.transforms import Bbox, TransformedBbox, blended_transform_factory
11-
from mpl_toolkits.axes_grid1.inset_locator import (BboxConnector, BboxConnectorPatch,
12-
BboxPatch)
11+
from mpl_toolkits.axes_grid1.inset_locator import (
12+
BboxConnector,
13+
BboxConnectorPatch,
14+
BboxPatch,
15+
)
1316

1417

1518
def connect_bbox(bbox1, bbox2,

‎galleries/examples/ticks/date_formatters_locators.py‎

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,30 @@
1313
import numpy as np
1414

1515
# While these appear unused directly, they are used from eval'd strings.
16-
from matplotlib.dates import (FR, MO, MONTHLY, SA, SU, TH, TU, WE, AutoDateFormatter,
17-
AutoDateLocator, ConciseDateFormatter, DateFormatter,
18-
DayLocator, HourLocator, MicrosecondLocator,
19-
MinuteLocator, MonthLocator, RRuleLocator, SecondLocator,
20-
WeekdayLocator, YearLocator, rrulewrapper)
16+
from matplotlib.dates import (
17+
FR,
18+
MO,
19+
MONTHLY,
20+
SA,
21+
SU,
22+
TH,
23+
TU,
24+
WE,
25+
AutoDateFormatter,
26+
AutoDateLocator,
27+
ConciseDateFormatter,
28+
DateFormatter,
29+
DayLocator,
30+
HourLocator,
31+
MicrosecondLocator,
32+
MinuteLocator,
33+
MonthLocator,
34+
RRuleLocator,
35+
SecondLocator,
36+
WeekdayLocator,
37+
YearLocator,
38+
rrulewrapper,
39+
)
2140
import matplotlib.ticker as ticker
2241

2342

‎galleries/examples/user_interfaces/embedding_in_wx2_sgskip.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
import numpy as np
1414

1515
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
16-
from matplotlib.backends.backend_wxagg import \
17-
NavigationToolbar2WxAgg as NavigationToolbar
16+
from matplotlib.backends.backend_wxagg import (
17+
NavigationToolbar2WxAgg as NavigationToolbar,
18+
)
1819
from matplotlib.figure import Figure
1920

2021

‎galleries/examples/user_interfaces/embedding_in_wx3_sgskip.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727
import numpy as np
2828

2929
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
30-
from matplotlib.backends.backend_wxagg import \
31-
NavigationToolbar2WxAgg as NavigationToolbar
30+
from matplotlib.backends.backend_wxagg import (
31+
NavigationToolbar2WxAgg as NavigationToolbar,
32+
)
3233
import matplotlib.cbook as cbook
3334
from matplotlib.figure import Figure
3435

‎galleries/examples/user_interfaces/embedding_in_wx4_sgskip.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
import numpy as np
1212

1313
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
14-
from matplotlib.backends.backend_wxagg import \
15-
NavigationToolbar2WxAgg as NavigationToolbar
14+
from matplotlib.backends.backend_wxagg import (
15+
NavigationToolbar2WxAgg as NavigationToolbar,
16+
)
1617
from matplotlib.figure import Figure
1718

1819

0 commit comments

Comments
 (0)