mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-02 09:33:25 +08:00
Use PEP 585 syntax wherever possible (#6717)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
from typing import Any, Tuple
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
|
||||
_ImageFilter = Literal["AUTO", "FlateDecode", "DCTDecode", "JPXDecode"]
|
||||
|
||||
SUPPORTED_IMAGE_FILTERS: Tuple[_ImageFilter, ...]
|
||||
SUPPORTED_IMAGE_FILTERS: tuple[_ImageFilter, ...]
|
||||
|
||||
def load_image(filename): ...
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from abc import ABC
|
||||
from typing import Any, List
|
||||
from typing import Any
|
||||
|
||||
def clear_empty_fields(d): ...
|
||||
def create_dictionary_string(
|
||||
@@ -29,7 +29,7 @@ def camel_case(property_name): ...
|
||||
class PDFString(str):
|
||||
def serialize(self): ...
|
||||
|
||||
class PDFArray(List[Any]):
|
||||
class PDFArray(list[Any]):
|
||||
def serialize(self): ...
|
||||
|
||||
class Destination(ABC):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from collections.abc import Iterable
|
||||
from typing import Any, Tuple
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
|
||||
_Unit = Literal["pt", "mm", "cm", "in"]
|
||||
@@ -14,5 +14,5 @@ def convert_unit(
|
||||
to_convert: float | Iterable[float | Iterable[Any]],
|
||||
old_unit: str | float,
|
||||
new_unit: str | float,
|
||||
) -> float | Tuple[float, ...]: ...
|
||||
) -> float | tuple[float, ...]: ...
|
||||
def dochecks() -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user