types.py: Derive enumerations from standard library classes

`types.py` defines a few enumerations, but only some of them are
derived from the standard `enum.Enum` class.

Among other things, this makes type checking difficult as the inferred
type of the values is `<class 'int'>` or `<class 'str'>`, and not
something like `<enum 'Scope'>`.

Note that `Consistency` is derived from `IntEnum` and not `Enum`, since
it is sometimes used in comparisons.
1 file changed