mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 06:36:54 +08:00
Pillow: mark MAX_IMAGE_PIXELS as non-final (#10445)
This commit is contained in:
@@ -3,7 +3,7 @@ from collections.abc import Callable, Iterable, Iterator, MutableMapping, Sequen
|
||||
from enum import IntEnum
|
||||
from pathlib import Path
|
||||
from typing import Any, ClassVar, Protocol, SupportsBytes
|
||||
from typing_extensions import Final, Literal, Self, TypeAlias, TypeGuard
|
||||
from typing_extensions import Literal, Self, TypeAlias, TypeGuard
|
||||
|
||||
from PIL.PyAccess import PyAccess
|
||||
|
||||
@@ -39,7 +39,12 @@ class _Writeable(SupportsWrite[bytes], Protocol):
|
||||
class DecompressionBombWarning(RuntimeWarning): ...
|
||||
class DecompressionBombError(Exception): ...
|
||||
|
||||
MAX_IMAGE_PIXELS: Final[int]
|
||||
# Despite the ALL_CAPS spelling, Pillow's docs mention that this threshold can
|
||||
# be altered at runtime. See
|
||||
# https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.open
|
||||
# or the permalink
|
||||
# https://github.com/python-pillow/Pillow/blob/10.0.0/docs/reference/Image.rst?plain=1#L54-L55
|
||||
MAX_IMAGE_PIXELS: int | None
|
||||
|
||||
USE_CFFI_ACCESS: bool
|
||||
|
||||
|
||||
Reference in New Issue
Block a user