Merge pull request #7951 from Yay295/patch-2

This commit is contained in:
Hugo van Kemenade 2024-04-11 13:47:05 +03:00 committed by GitHub
commit 4897954223
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,24 +16,17 @@ from __future__ import annotations
import sys import sys
from functools import lru_cache from functools import lru_cache
from typing import NamedTuple
class ModeDescriptor: class ModeDescriptor(NamedTuple):
"""Wrapper for mode strings.""" """Wrapper for mode strings."""
def __init__( mode: str
self, bands: tuple[str, ...]
mode: str, basemode: str
bands: tuple[str, ...], basetype: str
basemode: str, typestr: str
basetype: str,
typestr: str,
) -> None:
self.mode = mode
self.bands = bands
self.basemode = basemode
self.basetype = basetype
self.typestr = typestr
def __str__(self) -> str: def __str__(self) -> str:
return self.mode return self.mode