8000 Mypy gradual by ksunden · Pull Request #1 · ksunden/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Mypy gradual #1

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 45 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f063fd2
Fix polar transform with non-linear scales
dstansby Dec 27, 2022
e5cfa0f
Add docs for polar transform
dstansby Dec 27, 2022
c8f2017
Add a polar log test
dstansby Dec 27, 2022
d775dad
Fix line widths
dstansby Dec 27, 2022
6005a51
Math formatting in PolarTransform docstring
dstansby Dec 28, 2022
a0d4e6b
Fix indentation
dstansby Jan 3, 2023
fd6604d
Remove contour warning for "no-valid-levels".
anntzer Jan 9, 2023
ca48799
Remove remaining deprecations from 3.5
QuLogic Jan 11, 2023
8482fc2
MNT: remove check that exists only for removed deprecation
tacaswell Jan 11, 2023
90dfdbc
TST: remove tests of (now expired) deprecation warnings
tacaswell Jan 11, 2023
dfbaaa8
MNT: remove orphaned module attribute
tacaswell Jan 11, 2023
6f9c155
DOC: tweak wording on ArtistList class docstring
tacaswell Jan 11, 2023
a5d95fe
DOC: add notes for removals
tacaswell Jan 11, 2023
293ccc2
DOC: Enable Opensearch
StefRe Jan 12, 2023
a24daae
Rename y -> r
oscargus Jan 12, 2023
aa426be
Expire deprecations in widgets and keyword only arguments for Selecto…
oscargus Jan 12, 2023
ba03951
Merge pull request #24825 from dstansby/polar-scales
oscargus Jan 12, 2023
244a01c
Merge pull request #24948 from QuLogic/remove-deprecations
oscargus Jan 12, 2023
cf1b601
Merge pull request #24957 from StefRe/patch-1
jklymak Jan 12, 2023
018c5ef
Merge pull request #24912 from anntzer/cw
oscargus Jan 12, 2023
c1a8406
Remove additional deprecations from 3.5
QuLogic Jan 13, 2023
a3011df
Merge pull request #24965 from QuLogic/more-deprecations
oscargus Jan 13, 2023
a762ae6
MNT: Fix double % signs in matplotlibrc
StefRe Jan 13, 2023
3c28528
FIX: adjust_bbox should not modify layout engine
rcomer Jan 13, 2023
90fe9e0
Merge pull request #24973 from StefRe/patch-1
tacaswell Jan 13, 2023
235b01f
Merge pull request #24971 from rcomer/adjust_bbox-layout-engine
tacaswell Jan 13, 2023
a16ccba
Initially make mypy pass for tests
ksunden Dec 7, 2022
6acaa96
Insert the majority of the pyi stub files
ksunden Dec 9, 2022
e893af4
__init__.pyi, add __all__ to __init__
ksunden Dec 14, 2022
ada190c
Add mypy to reviewdog workflow
ksunden Dec 27, 2022
aa53a0c
Add __future__ imports to tests where inline type hints are included
ksunden Dec 27, 2022
1c94024
Update boilerplate to include annotations from pyi files
ksunden Jan 3, 2023
4be90ab
pyplot autogenerated bits with annotations
ksunden Jan 3, 2023
ea5d6d4
Use black for autogenerated portions of pyplot. remove textwrap usage
ksunden Jan 5, 2023
eaf2c43
Type handwritten portion of pyplot
ksunden Jan 4, 2023
0301057
Update for api changes since mypy branch was started
ksunden Jan 5, 2023
77952eb
STY: run black over pyi stub files
ksunden Jan 6, 2023
bbd4c33
Make Color a union type of 3/4-tuple of floats and str
ksunden Jan 6, 2023
d39a907
Resolve some typing todos
ksunden Jan 6, 2023
a94caab
Update Axes.pyi pie stub to include hatch, regenerate pyplot with hat…
ksunden Jan 11, 2023
8e5a30a
Redistribute types defined in _typing to their logical homes
ksunden Jan 11, 2023
117949f
Get sphinx building without errors
ksunden Jan 12, 2023
8bc7f1f
Update for expired 3.5 deprecations
ksunden Jan 13, 2023
5b02469
Boilerplate.py review comments
ksunden Jan 16, 2023
d832950
Review and CI warnings
ksunden Jan 17, 2023
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
Prev Previous commit
Next Next commit
Update for expired 3.5 deprecations
  • Loading branch information
ksunden committed Jan 13, 2023
commit 8bc7f1fc7de9c5c04ab82490caf9b18ce25d10c3
61 changes: 30 additions & 31 deletions lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,3 @@
__all__ = [
"__bibtex__",
"__version_info__",
"set_loglevel",
"ExecutableNotFoundError",
"get_configdir",
"get_cachedir",
"get_data_path",
"matplotlib_fname",
"RcParams",
"rc_params",
"rc_params_from_file",
"rcParamsDefault",
"rcParams",
"rcParamsOrig",
"defaultParams",
"rc",
"rcdefaults",
"rc_file_defaults",
"rc_file",
"rc_context",
"use",
"get_backend",
"interactive",
"is_interactive",
"default_test_modules",
"colormaps",
"color_sequences",
]


"""
An object-oriented plotting library.

Expand Down Expand Up @@ -134,6 +103,36 @@

"""

__all__ = [
"__bibtex__",
"__version_info__",
"set_loglevel",
"ExecutableNotFoundError",
"get_configdir",
"get_cachedir",
"get_data_path",
"matplotlib_fname",
"RcParams",
"rc_params",
"rc_params_from_file",
"rcParamsDefault",
"rcParams",
"rcParamsOrig",
"defaultParams",
"rc",
"rcdefaults",
"rc_file_defaults",
"rc_file",
"rc_context",
"use",
"get_backend",
"interactive",
"is_interactive",
"colormaps",
"color_sequences",
]


import atexit
from collections import namedtuple
from collections.abc import MutableMapping
Expand Down
3 changes: 0 additions & 3 deletions lib/matplotlib/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ __all__ = [
"get_backend",
"interactive",
"is_interactive",
"default_test_modules",
"colormaps",
"color_sequences",
]
Expand Down Expand Up @@ -105,8 +104,6 @@ def get_backend() -> str: ...
def interactive(b: bool) -> None: ...
def is_interactive() -> bool: ...

default_test_modules: list[str]

def _preprocess_data(
func: Callable | None = ...,
*,
Expand Down
18 changes: 12 additions & 6 deletions lib/matplotlib/axes/_base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ class _AxesBase(martist.Artist):
def clear(self) -> None: ...
def cla(self) -> None: ...

class ArtistList(MutableSequence[Artist]):
# Could be made generic, but comments indicate it may be temporary anyway
class ArtistList(Sequence[Artist]):
def __init__(
self,
axes: _AxesBase,
prop_name: str,
add_name: str,
valid_types: list[Type] | None = ...,
invalid_types: tuple[Type] | None = ...,
) -> None: ...
Expand All @@ -138,14 +138,20 @@ class _AxesBase(martist.Artist):
def __getitem__(self, key: int) -> Artist: ...
@overload
def __getitem__(self, key: slice) -> list[Artist]: ...

@overload
def __add__(self, other: _AxesBase.ArtistList) -> list[Artist]: ...
@overload
def __add__(self, other: list[Any]) -> list[Any]: ...
@overload
def __add__(self, other: tuple[Any]) -> tuple[Any]: ...

@overload
def __radd__(self, other: _AxesBase.ArtistList) -> list[Artist]: ...
def insert(self, index: int, item: Artist) -> None: ...
@overload
def __setitem__(self, key: int | slice, item: Artist) -> None: ...
def __radd__(self, other: list[Any]) -> list[Any]: ...
@overload
def __setitem__(self, key: slice, item: Iterable[Artist]) -> None: ...
def __delitem__(self, key: int | slice) -> None: ...
def __radd__(self, other: tuple[Any]) -> tuple[Any]: ...

@property
def artists(self) -> _AxesBase.ArtistList: ...
Expand Down
4 changes: 1 addition & 3 deletions lib/matplotlib/colorbar.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,15 @@ class Colorbar:
def set_ticks(
self,
ticks: Sequence[float] | Locator,
update_ticks: bool = ...,
labels: Sequence[str] | None = ...,
*,
labels: Sequence[str] | None = ...,
minor: bool = ...,
**kwargs
) -> None: ...
def get_ticks(self, minor: bool = ...) -> np.ndarray: ...
def set_ticklabels(
self,
ticklabels: Sequence[str],
update_ticks: bool = ...,
*,
minor: bool = ...,
**kwargs
Expand Down
0