mirror of
https://github.com/iluvcapra/pycmx.git
synced 2025-12-31 08:50:54 +00:00
tweaking generics for <3.10 support
This commit is contained in:
@@ -1,18 +1,19 @@
|
|||||||
# pycmx
|
# pycmx
|
||||||
# (c) 2025 Jamie Hardt
|
# (c) 2025 Jamie Hardt
|
||||||
|
|
||||||
|
from dataclasses import dataclass
|
||||||
from typing import Generic, NamedTuple, TypeVar
|
from typing import Generic, NamedTuple, TypeVar
|
||||||
|
|
||||||
T = TypeVar('T')
|
T = TypeVar('T')
|
||||||
|
|
||||||
|
@dataclass
|
||||||
class Rgb(NamedTuple, Generic[T]):
|
class Rgb(Generic[T]):
|
||||||
red: T
|
red: T
|
||||||
green: T
|
green: T
|
||||||
blue: T
|
blue: T
|
||||||
|
|
||||||
|
@dataclass
|
||||||
class AscSopComponents(NamedTuple, Generic[T]):
|
class AscSopComponents(Generic[T]):
|
||||||
"""
|
"""
|
||||||
Fields in an ASC SOP (Slope-Offset-Power) color transfer function
|
Fields in an ASC SOP (Slope-Offset-Power) color transfer function
|
||||||
statement
|
statement
|
||||||
|
|||||||
Reference in New Issue
Block a user