Skip to content

Commit 6019c46

Browse files
committed
Replace deprecated imports
1 parent be5e860 commit 6019c46

File tree

8 files changed

+9
-7
lines changed

8 files changed

+9
-7
lines changed

lib/matplotlib/_api/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from collections.abc import Callable, Generator, Iterable, Mapping, Sequence
22
from typing import Any, TypeVar, overload
3-
from typing_extensions import Self # < Py 3.11
3+
from typing import Self
44

55
from numpy.typing import NDArray
66

lib/matplotlib/axis.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from collections.abc import Callable, Iterable, Sequence
22
import datetime
33
from typing import Any, Literal, overload
4-
from typing_extensions import Self # < Py 3.11
4+
from typing import Self
55

66
import numpy as np
77
from numpy.typing import ArrayLike

lib/matplotlib/cbook.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ from typing import (
1414
Generic,
1515
IO,
1616
Literal,
17-
Sequence,
1817
TypeVar,
1918
overload,
2019
)
20+
from collections.abc import Sequence
2121

2222
_T = TypeVar("_T")
2323

lib/matplotlib/dviread.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ from enum import Enum
66
from collections.abc import Generator
77

88
from typing import NamedTuple
9-
from typing_extensions import Self # < Py 3.11
9+
from typing import Self
1010

1111
class _dvistate(Enum):
1212
pre = ...

lib/matplotlib/sankey.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ from matplotlib.axes import Axes
22

33
from collections.abc import Callable, Iterable
44
from typing import Any
5-
from typing_extensions import Self # < Py 3.11
5+
from typing import Self
66

77
import numpy as np
88

lib/matplotlib/tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
if typing.TYPE_CHECKING:
16-
from typing_extensions import Self
16+
from typing import Self
1717

1818
T = TypeVar('T')
1919

lib/matplotlib/typing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"""
1313
from collections.abc import Hashable, Sequence
1414
import pathlib
15-
from typing import Any, Callable, Literal, TypeAlias, TypeVar, Union
15+
from typing import Any, Literal, TypeAlias, TypeVar, Union
16+
from collections.abc import Callable
1617

1718
from . import path
1819
from ._enums import JoinStyle, CapStyle

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ select = [
140140
"E",
141141
"F",
142142
"W",
143+
"UP035",
143144
# The following error codes require the preview mode to be enabled.
144145
"E201",
145146
"E202",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy