From cba8e09494e902a1ad05ea1d2415b8c8c7743ca2 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Tue, 18 Feb 2025 22:39:46 +0000 Subject: [PATCH] Fix pre-commit.ci lint. --- src/PIL/Image.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index ebfd49b00..d52985da0 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -3210,9 +3210,16 @@ class SupportsArrowArrayInterface(Protocol): data interface. """ - def __arrow_c_array__( - self, requested_schema: PyCapsule = None - ) -> tuple[PyCapsule, PyCapsule]: + # Sorry, no types for you until pre-commit.ci stops changing stringy + # PyCapsule type to an unimportable value type, which then fails lint. + # PyCapsules are not importable, and only available in the C-API layer. + # def __arrow_c_array__( + # self, requested_schema: 'PyCapsule' = None + # ) -> tuple['PyCapsule', 'PyCapsule']: + # raise NotImplementedError() + + # old not typed definition. + def __arrow_c_array__(self, requested_schema = None) -> tuple: raise NotImplementedError()