I really don't think namedtuples are suitable here because of the lack of support for optional items in their constructors.
For plain classes, how do you propose spelling them? This doesn't work for obvious reasons:
class SourceArtifactMetadata: format # type: SourcePackageFileType name # type: str version # type: str
And if I use something like `format = None` there, then they all have to be `Optional[...]` when they really shouldn't be optional.
« Back to merge proposal
I really don't think namedtuples are suitable here because of the lack of support for optional items in their constructors.
For plain classes, how do you propose spelling them? This doesn't work for obvious reasons:
class SourceArtifactM etadata: leType
format # type: SourcePackageFi
name # type: str
version # type: str
And if I use something like `format = None` there, then they all have to be `Optional[...]` when they really shouldn't be optional.