Skip to content

Commit 02bd2ac

Browse files
committed
Replace py3.12 types with TypeAliases
1 parent 9f32450 commit 02bd2ac

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/matplotlib/backends/backend_pdf.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import os
22
from datetime import datetime
33
from enum import Enum
44
from functools import total_ordering
5-
from typing import IO, Any, Protocol, Self
5+
from typing import IO, Any, Protocol, Self, TypeAlias
66

77
import numpy as np
88
from _typeshed import ReadableBuffer, SupportsWrite
@@ -17,7 +17,7 @@ from . import _backend_pdf_ps
1717
class _SupportsPdfRepr(Protocol):
1818
def pdfRepr(self) -> bytes: ...
1919

20-
type _SupportsPdfReprExt = (
20+
_SupportsPdfReprExt: TypeAlias = (
2121
_SupportsPdfRepr
2222
| float
2323
| np.floating
@@ -34,7 +34,7 @@ type _SupportsPdfReprExt = (
3434
| BboxBase
3535
)
3636

37-
type _MetadataDict = dict[str, str | datetime | Name]
37+
_MetadataDict: TypeAlias = dict[str, str | datetime | Name]
3838

3939
def pdfRepr(obj: _SupportsPdfReprExt) -> bytes: ...
4040

0 commit comments

Comments
 (0)