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
class ParameterSet(
NamedTuple(
"ParameterSet",
[
("values", Sequence[Union[object, NotSetType]]),
("marks", Collection[Union["MarkDecorator", "Mark"]]),
("id", Optional[str]),
],
)
):
class ParameterSet(NamedTuple):
values: Sequence[Union[object, NotSetType]]
marks: Collection[Union["MarkDecorator", "Mark"]]
id: Optional[str]
@classmethod
def param(
cls,