Closed
Description
adding a type to an enum is a lazy and error-prone way to inherit the needed functionality from primitives.
- instead of "equal"(
==
) a "identical"(is)
to be used. - if mathematical comparrisson ala
!= > >= == <= <
was required, then it should be implemented by hand with the correct operations andNotImplemented
errors - if hasing was needed, then it should be done based on the case's name.
from
class SchemaVersion(str, Enum):
foo: str = '1'
...
to
class SchemaVersion(Enum):
foo: str = '1'
...
possibly a breaking change
does not apply to the schema-internal enums,
does only apply to:
schema.Format
-- unique autoschema.SchemaVersion
-- tuple of int with compare