Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,8 @@ def convert_transparency(
if new_im.mode == "P" and new_im.palette:
try:
new_im.info["transparency"] = new_im.palette.getcolor(
cast(tuple[int, ...], trns), new_im # trns was converted to RGB
cast(tuple[int, ...], trns),
new_im, # trns was converted to RGB
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was your thinking behind this reformatting?

)
except ValueError as e:
del new_im.info["transparency"]
Expand Down Expand Up @@ -1433,7 +1434,7 @@ def getdata(self, band: int | None = None) -> core.ImagingCore:
Note that the sequence object returned by this method is an
internal PIL data type, which only supports certain sequence
operations. To convert it to an ordinary sequence (e.g. for
printing), use ``list(im.getdata())``.
printing), use ``list(iter(im.getdata()))``.

:param band: What band to return. The default is to return
all bands. To return a single band, pass in the index
Expand Down Expand Up @@ -3224,7 +3225,8 @@ class SupportsArrowArrayInterface(Protocol):
"""

def __arrow_c_array__(
self, requested_schema: "PyCapsule" = None # type: ignore[name-defined] # noqa: F821, UP037
self,
requested_schema: "PyCapsule" = None, # type: ignore[name-defined] # noqa: F821, UP037
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was your thinking behind this reformatting?

) -> tuple["PyCapsule", "PyCapsule"]: # type: ignore[name-defined] # noqa: F821, UP037
raise NotImplementedError()

Expand Down
Loading