Skip to content

Commit

Permalink
Merge pull request #7951 from Yay295/patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Apr 11, 2024
2 parents 3fd5739 + 05d2314 commit 4897954
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions src/PIL/ImageMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,17 @@

import sys
from functools import lru_cache
from typing import NamedTuple


class ModeDescriptor:
class ModeDescriptor(NamedTuple):
"""Wrapper for mode strings."""

def __init__(
self,
mode: str,
bands: tuple[str, ...],
basemode: str,
basetype: str,
typestr: str,
) -> None:
self.mode = mode
self.bands = bands
self.basemode = basemode
self.basetype = basetype
self.typestr = typestr
mode: str
bands: tuple[str, ...]
basemode: str
basetype: str
typestr: str

def __str__(self) -> str:
return self.mode
Expand Down

0 comments on commit 4897954

Please sign in to comment.