commit | fa6d9856c86e1fe72af02f4ef32267b66be49c75 | [log] [tgz] |
---|---|---|
author | Chandan Singh <chandan@chandansingh.net> | Tue Jul 16 22:08:28 2019 +0100 |
committer | Chandan Singh <chandan@chandansingh.net> | Tue Jul 16 22:24:19 2019 +0100 |
tree | e5f1fc18cb0156891ba011902124e480260481ed | |
parent | fbb8eea8334023e30c8719cb52f9b0e226b4eb8b [diff] |
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.