Removed FileDescriptor

This commit is contained in:
Andrew Murray 2024-02-10 20:47:32 +11:00
parent 958a651449
commit 517b797132
2 changed files with 3 additions and 6 deletions

View File

@ -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.

View 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"]