mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 18:56:17 +03:00
Removed FileDescriptor
This commit is contained in:
parent
958a651449
commit
517b797132
|
@ -32,7 +32,7 @@ from typing import IO
|
|||
from . import ImageFile, ImagePalette, UnidentifiedImageError
|
||||
from ._binary import i16be as i16
|
||||
from ._binary import i32be as i32
|
||||
from ._typing import FileDescriptor, StrOrBytesPath
|
||||
from ._typing import StrOrBytesPath
|
||||
|
||||
|
||||
class GdImageFile(ImageFile.ImageFile):
|
||||
|
@ -81,9 +81,7 @@ class GdImageFile(ImageFile.ImageFile):
|
|||
]
|
||||
|
||||
|
||||
def open(
|
||||
fp: StrOrBytesPath | FileDescriptor | IO[bytes], mode: str = "r"
|
||||
) -> GdImageFile:
|
||||
def open(fp: StrOrBytesPath | IO[bytes], mode: str = "r") -> GdImageFile:
|
||||
"""
|
||||
Load texture from a GD image file.
|
||||
|
||||
|
|
|
@ -27,8 +27,7 @@ class SupportsRead(Protocol[_T_co]):
|
|||
def read(self, __length: int = ...) -> _T_co: ...
|
||||
|
||||
|
||||
FileDescriptor = int
|
||||
StrOrBytesPath = Union[str, bytes, "os.PathLike[str]", "os.PathLike[bytes]"]
|
||||
|
||||
|
||||
__all__ = ["FileDescriptor", "TypeGuard", "StrOrBytesPath", "SupportsRead"]
|
||||
__all__ = ["TypeGuard", "StrOrBytesPath", "SupportsRead"]
|
||||
|
|
Loading…
Reference in New Issue
Block a user