mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Merge pull request #7951 from Yay295/patch-2
This commit is contained in:
commit
4897954223
|
@ -16,24 +16,17 @@ from __future__ import annotations
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user