tweaking generics for <3.10 support

This commit is contained in:
2025-12-16 16:56:55 -08:00
parent 7b875900f9
commit f56a2aef4f

View File

@@ -1,18 +1,19 @@
# pycmx
# (c) 2025 Jamie Hardt
from dataclasses import dataclass
from typing import Generic, NamedTuple, TypeVar
T = TypeVar('T')
class Rgb(NamedTuple, Generic[T]):
@dataclass
class Rgb(Generic[T]):
red: T
green: T
blue: T
class AscSopComponents(NamedTuple, Generic[T]):
@dataclass
class AscSopComponents(Generic[T]):
"""
Fields in an ASC SOP (Slope-Offset-Power) color transfer function
statement