Merge pull request #9612 from bluetech/namedtuple-class

mark/structures: use class-based NamedTuple syntax
This commit is contained in:
Ran Benita 2022-02-05 12:16:00 +02:00 committed by GitHub
commit 18c0cfc0de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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,