Skip to content

Commit 674751a

Browse files
committed
ci: Correct stubtest allow list format
The list is full of regexs, not globs, so correctly escape the periods to be more specific. Note that to catch `module.__init__`, you need to specific `module`, so there is some slight modification for `matplotlib.tests` / `matplotlib.sphinxext`.
1 parent 13380e1 commit 674751a

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

ci/mypy-stubtest-allowlist.txt

+28-28
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
11
# Non-typed (and private) modules/functions
2-
matplotlib.backends.*
3-
matplotlib.tests.*
4-
matplotlib.pylab.*
5-
matplotlib._.*
6-
matplotlib.rcsetup._listify_validator
7-
matplotlib.rcsetup._validate_linestyle
8-
matplotlib.ft2font.Glyph
9-
matplotlib.testing.jpl_units.*
10-
matplotlib.sphinxext.*
2+
matplotlib\.backends\..*
3+
matplotlib\.tests(\..*)?
4+
matplotlib\.pylab\..*
5+
matplotlib\._.*
6+
matplotlib\.rcsetup\._listify_validator
7+
matplotlib\.rcsetup\._validate_linestyle
8+
matplotlib\.ft2font\.Glyph
9+
matplotlib\.testing\.jpl_units\..*
10+
matplotlib\.sphinxext(\..*)?
1111

1212
# set methods have heavy dynamic usage of **kwargs, with differences for subclasses
1313
# which results in technically inconsistent signatures, but not actually a problem
14-
matplotlib.*\.set$
14+
matplotlib\..*\.set$
1515

1616
# Typed inline, inconsistencies largely due to imports
17-
matplotlib.pyplot.*
18-
matplotlib.typing.*
17+
matplotlib\.pyplot\..*
18+
matplotlib\.typing\..*
1919

2020
# Other decorator modifying signature
2121
# Backcompat decorator which does not modify runtime reported signature
22-
matplotlib.offsetbox.*Offset[Bb]ox.get_offset
22+
matplotlib\.offsetbox\..*Offset[Bb]ox\.get_offset
2323

2424
# Inconsistent super/sub class parameter name (maybe rename for consistency)
25-
matplotlib.projections.polar.RadialLocator.nonsingular
26-
matplotlib.ticker.LogLocator.nonsingular
27-
matplotlib.ticker.LogitLocator.nonsingular
25+
matplotlib\.projections\.polar\.RadialLocator\.nonsingular
26+
matplotlib\.ticker\.LogLocator\.nonsingular
27+
matplotlib\.ticker\.LogitLocator\.nonsingular
2828

2929
# Stdlib/Enum considered inconsistent (no fault of ours, I don't think)
30-
matplotlib.backend_bases._Mode.__new__
31-
matplotlib.units.Number.__hash__
30+
matplotlib\.backend_bases\._Mode\.__new__
31+
matplotlib\.units\.Number\.__hash__
3232

3333
# 3.6 Pending deprecations
34-
matplotlib.figure.Figure.set_constrained_layout
35-
matplotlib.figure.Figure.set_constrained_layout_pads
36-
matplotlib.figure.Figure.set_tight_layout
34+
matplotlib\.figure\.Figure\.set_constrained_layout
35+
matplotlib\.figure\.Figure\.set_constrained_layout_pads
36+
matplotlib\.figure\.Figure\.set_tight_layout
3737

3838
# Maybe should be abstractmethods, required for subclasses, stubs define once
39-
matplotlib.tri.*TriInterpolator.__call__
40-
matplotlib.tri.*TriInterpolator.gradient
39+
matplotlib\.tri\..*TriInterpolator\.__call__
40+
matplotlib\.tri\..*TriInterpolator\.gradient
4141

4242
# TypeVar used only in type hints
43-
matplotlib.backend_bases.FigureCanvasBase._T
44-
matplotlib.backend_managers.ToolManager._T
45-
matplotlib.spines.Spine._T
43+
matplotlib\.backend_bases\.FigureCanvasBase\._T
44+
matplotlib\.backend_managers\.ToolManager\._T
45+
matplotlib\.spines\.Spine\._T
4646

4747
# Parameter inconsistency due to 3.10 deprecation
48-
matplotlib.figure.FigureBase.get_figure
48+
matplotlib\.figure\.FigureBase\.get_figure
4949

5050
# getitem method only exists for 3.10 deprecation backcompatability
51-
matplotlib.inset.InsetIndicator.__getitem__
51+
matplotlib\.inset\.InsetIndicator\.__getitem__

0 commit comments

Comments
 (0)