Skip to content

Commit bd9d307

Browse files
committed
Update for expired 3.5 deprecations
1 parent 2f44fbc commit bd9d307

File tree

4 files changed

+43
-43
lines changed

4 files changed

+43
-43
lines changed

lib/matplotlib/__init__.py

+30-31
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,3 @@
1-
__all__ = [
2-
"__bibtex__",
3-
"__version_info__",
4-
"set_loglevel",
5-
"ExecutableNotFoundError",
6-
"get_configdir",
7-
"get_cachedir",
8-
"get_data_path",
9-
"matplotlib_fname",
10-
"RcParams",
11-
"rc_params",
12-
"rc_params_from_file",
13-
"rcParamsDefault",
14-
"rcParams",
15-
"rcParamsOrig",
16-
"defaultParams",
17-
"rc",
18-
"rcdefaults",
19-
"rc_file_defaults",
20-
"rc_file",
21-
"rc_context",
22-
"use",
23-
"get_backend",
24-
"interactive",
25-
"is_interactive",
26-
"default_test_modules",
27-
"colormaps",
28-
"color_sequences",
29-
]
30-
31-
321
"""
332
An object-oriented plotting library.
343
@@ -132,6 +101,36 @@
132101
133102
"""
134103

104+
__all__ = [
105+
"__bibtex__",
106+
"__version_info__",
107+
"set_loglevel",
108+
"ExecutableNotFoundError",
109+
"get_configdir",
110+
"get_cachedir",
111+
"get_data_path",
112+
"matplotlib_fname",
113+
"RcParams",
114+
"rc_params",
115+
"rc_params_from_file",
116+
"rcParamsDefault",
117+
"rcParams",
118+
"rcParamsOrig",
119+
"defaultParams",
120+
"rc",
121+
"rcdefaults",
122+
"rc_file_defaults",
123+
"rc_file",
124+
"rc_context",
125+
"use",
126+
"get_backend",
127+
"interactive",
128+
"is_interactive",
129+
"colormaps",
130+
"color_sequences",
131+
]
132+
133+
135134
import atexit
136135
from collections import namedtuple
137136
from collections.abc import MutableMapping

lib/matplotlib/__init__.pyi

-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ __all__ = [
2323
"get_backend",
2424
"interactive",
2525
"is_interactive",
26-
"default_test_modules",
2726
"colormaps",
2827
"color_sequences",
2928
]
@@ -105,8 +104,6 @@ def get_backend() -> str: ...
105104
def interactive(b: bool) -> None: ...
106105
def is_interactive() -> bool: ...
107106

108-
default_test_modules: list[str]
109-
110107
def _preprocess_data(
111108
func: Callable | None = ...,
112109
*,

lib/matplotlib/axes/_base.pyi

+12-6
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ class _AxesBase(martist.Artist):
123123
def clear(self) -> None: ...
124124
def cla(self) -> None: ...
125125

126-
class ArtistList(MutableSequence[Artist]):
126+
# Could be made generic, but comments indicate it may be temporary anyway
127+
class ArtistList(Sequence[Artist]):
127128
def __init__(
128129
self,
129130
axes: _AxesBase,
130131
prop_name: str,
131-
add_name: str,
132132
valid_types: list[Type] | None = ...,
133133
invalid_types: tuple[Type] | None = ...,
134134
) -> None: ...
@@ -138,14 +138,20 @@ class _AxesBase(martist.Artist):
138138
def __getitem__(self, key: int) -> Artist: ...
139139
@overload
140140
def __getitem__(self, key: slice) -> list[Artist]: ...
141+
142+
@overload
141143
def __add__(self, other: _AxesBase.ArtistList) -> list[Artist]: ...
144+
@overload
145+
def __add__(self, other: list[Any]) -> list[Any]: ...
146+
@overload
147+
def __add__(self, other: tuple[Any]) -> tuple[Any]: ...
148+
149+
@overload
142150
def __radd__(self, other: _AxesBase.ArtistList) -> list[Artist]: ...
143-
def insert(self, index: int, item: Artist) -> None: ...
144151
@overload
145-
def __setitem__(self, key: int | slice, item: Artist) -> None: ...
152+
def __radd__(self, other: list[Any]) -> list[Any]: ...
146153
@overload
147-
def __setitem__(self, key: slice, item: Iterable[Artist]) -> None: ...
148-
def __delitem__(self, key: int | slice) -> None: ...
154+
def __radd__(self, other: tuple[Any]) -> tuple[Any]: ...
149155

150156
@property
151157
def artists(self) -> _AxesBase.ArtistList: ...

lib/matplotlib/colorbar.pyi

+1-3
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,15 @@ class Colorbar:
8686
def set_ticks(
8787
self,
8888
ticks: Sequence[float] | Locator,
89-
update_ticks: bool = ...,
90-
labels: Sequence[str] | None = ...,
9189
*,
90+
labels: Sequence[str] | None = ...,
9291
minor: bool = ...,
9392
**kwargs
9493
) -> None: ...
9594
def get_ticks(self, minor: bool = ...) -> np.ndarray: ...
9695
def set_ticklabels(
9796
self,
9897
ticklabels: Sequence[str],
99-
update_ticks: bool = ...,
10098
*,
10199
minor: bool = ...,
102100
**kwargs

0 commit comments

Comments
 (0)