8000 Updating self and axis in pyi · matplotlib/matplotlib@10df152 · GitHub
[go: up one dir, main page]

Skip to content

Commit 10df152

Browse files
committed
Updating self and axis in pyi
1 parent fbb4448 commit 10df152

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

lib/matplotlib/scale.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def _make_axis_parameter_optional(init_func):
135135
--------
136136
>>> from matplotlib.scale import ScaleBase
137137
>>> class CustomScale(ScaleBase):
138-
... @handle_axis_parameter
138+
... @_make_axis_parameter_optional
139139
... def __init__(self, axis, custom_param=1):
140140
... self.custom_param = custom_param
141141
"""
@@ -157,7 +157,7 @@ class LinearScale(ScaleBase):
157157

158158
name = 'linear'
159159

160-
@handle_axis_parameter
160+
@_make_axis_parameter_optional
161161
def __init__(self, axis=None):
162162
# This method is present only to prevent inheritance of the base class'
163163
# constructor docstring, which would otherwise end up interpolated into
@@ -228,7 +228,7 @@ class FuncScale(ScaleBase):
228228

229229
name = 'function'
230230

231-
@handle_axis_parameter
231+
@_make_axis_parameter_optional
232232
def __init__(self, axis, functions):
233233
"""
234234
Parameters
@@ -328,7 +328,7 @@ class LogScale(ScaleBase):
328328
"""
329329
name = 'log'
330330

331-
@handle_axis_parameter
331+
@_make_axis_parameter_optional
332332
def __init__(self, axis=None, *, base=10, subs=None, nonpositive="clip"):
333333
"""
334334
Parameters
@@ -380,7 +380,7 @@ class FuncScaleLog(LogScale):
380380

381381
name = 'functionlog'
382382

383-
@handle_axis_parameter
383+
@_make_axis_parameter_optional
384384
def __init__(self, axis, functions, base=10):
385385
"""
386386
Parameters
@@ -506,7 +506,7 @@ class SymmetricalLogScale(ScaleBase):
506506
"""
507507
name = 'symlog'
508508

509-
@handle_axis_parameter
509+
@_make_axis_parameter_optional
510510
def __init__(self, axis=None, *, base=10, linthresh=2, subs=None, linscale=1):
511511
self._transform = SymmetricalLogTransform(base, linthresh, linscale)
512512
self.subs = subs
@@ -599,7 +599,7 @@ class AsinhScale(ScaleBase):
599599
1024: (256, 512)
600600
}
601601

602-
@handle_axis_parameter
602+
@_make_axis_parameter_optional
603603
def __init__(self, axis=None, *, linear_width=1.0,
604604
base=10, subs='auto', **kwargs):
605605
"""
@@ -698,7 +698,7 @@ class LogitScale(ScaleBase):
698698
"""
699699
name = 'logit'
700700

701-
@handle_axis_parameter
701+
@_make_axis_parameter_optional
702702
def __init__(self, axis=None, nonpositive='mask', *,
703703
one_half=r"\frac{1}{2}", use_overline=False):
704704
r"""

lib/matplotlib/scale.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ class SymmetricalLogScale(ScaleBase):
104104
name: str
105105
subs: Iterable[int] | None
106106
def __init__(
107-
self: SymmetricalLogScale,
108-
axis: Union[Axis, None] = None,
107+
self,
108+
axis: Axis | None = ...,
109109
*,
110110
base: float = 10,
111111
linthresh: float = 2,
@@ -139,7 +139,7 @@ class AsinhScale(ScaleBase):
139139
auto_tick_multipliers: dict[int, tuple[int, ...]]
140140
def __init__(
141141
self,
142-
axis: Union[Axis, None] = None,
142+
axis: Axis | None = ...,
143143
*,
144144
linear_width: float = ...,
145145
base: float = ...,
@@ -165,8 +165,8 @@ class LogisticTransform(Transform):
165165
class LogitScale(ScaleBase):
166166
name: str
167167
def __init__(
168-
self: LogitScale,
169-
axis: Union[Axis, None] = None,
168+
self,
169+
axis: Axis | None = ...,
170170
nonpositive: Union[Literal['mask'], Literal['clip']] = 'mask',
171171
*,
172172
one_half: str = '\\frac{1}{2}',

0 commit comments

Comments
 (0)
0