Page MenuHomeSoftware Heritage
Paste P621

stylish poll
ActivePublic

Authored by douardda on Mar 20 2020, 12:18 PM.
Do you prefer:
@attr.s(frozen=True)
class Person(BaseModel):
"""Represents the author/committer of a revision or release."""
fullname = attr.ib(type=bytes, validator=type_validator())
name = attr.ib(type=Optional[bytes], validator=type_validator())
email = attr.ib(type=Optional[bytes], validator=type_validator())
or
@attr.s(frozen=True)
class Person(BaseModel):
"""Represents the author/committer of a revision or release."""
fullname = attr.ib(type=bytes)
name = attr.ib(type=Optional[bytes])
email = attr.ib(type=Optional[bytes])
fullname.validator(type_validator())
name.validator(type_validator())
email.validator(type_validator())