mark/structures: use class-based NamedTuple syntax

Should hopefully work now in Python>=3.7.
This commit is contained in:
Ran Benita 2022-02-05 11:52:36 +02:00
parent 77a38a3b75
commit 20c2c30ff2
1 changed files with 5 additions and 10 deletions

View File

@ -72,16 +72,11 @@ def get_empty_parameterset_mark(
return mark return mark
class ParameterSet( class ParameterSet(NamedTuple):
NamedTuple( values: Sequence[Union[object, NotSetType]]
"ParameterSet", marks: Collection[Union["MarkDecorator", "Mark"]]
[ id: Optional[str]
("values", Sequence[Union[object, NotSetType]]),
("marks", Collection[Union["MarkDecorator", "Mark"]]),
("id", Optional[str]),
],
)
):
@classmethod @classmethod
def param( def param(
cls, cls,