8000 Remove self type (py3.9 compatibility) · matplotlib/matplotlib@e4aa8b7 · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e4aa8b7

Browse files
committed
Remove self type (py3.9 compatibility)
1 parent ec6a139 commit e4aa8b7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/matplotlib/dviread.pyi

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import os
55
from enum import Enum
66
from collections.abc import Generator
77

8-
from typing import NamedTuple, Self
8+
from typing import NamedTuple
99

1010
class _dvistate(Enum):
1111
pre: int
@@ -48,7 +48,8 @@ class Dvi:
4848
fonts: dict[int, DviFont]
4949
state: _dvistate
5050
def __init__(self, filename: str | os.PathLike, dpi: float | None) -> None: ...
51-
def __enter__(self) -> Self: ...
51+
# Replace return with Self when py3.9 is dropped
52+
def __enter__(self) -> Dvi: ...
5253
def __exit__(self, etype, evalue, etrace) -> None: ...
5354
def __iter__(self) -> Generator[Page, None, None]: ...
5455
def close(self) -> None: ...
@@ -83,7 +84,8 @@ class PsFont(NamedTuple):
8384
filename: str
8485

8586
class PsfontsMap:
86-
def __new__(cls, filename: str | os.PathLike) -> Self: ...
87+
# Replace return with Self when py3.9 is dropped
88+
def __new__(cls, filename: str | os.PathLike) -> PsfontsMap: ...
8789
def __getitem__(self, texname: bytes) -> PsFont: ...
8890

8991
def find_tex_file(filename: str | os.PathLike) -> str: ...

0 commit comments

Comments
 (0)
0