From 7ac90faabcfbabe2d90a37e7e2b3d74ff453a16f Mon Sep 17 00:00:00 2001 From: wiredfool Date: Tue, 18 Feb 2025 21:51:52 +0000 Subject: [PATCH] PyCapsules aren't actually importable in python. They're only a C-api thing, so we can only get their type from an instance. They're not in Typing or Types. --- src/PIL/Image.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index ebfd49b0076..738702623ee 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -3211,8 +3211,8 @@ class SupportsArrowArrayInterface(Protocol): """ def __arrow_c_array__( - self, requested_schema: PyCapsule = None - ) -> tuple[PyCapsule, PyCapsule]: + self, requested_schema: 'PyCapsule' = None + ) -> tuple['PyCapsule', 'PyCapsule']: raise NotImplementedError()