summaryrefslogtreecommitdiff
path: root/astroid/exceptions.py
diff options
context:
space:
mode:
authorPhilip Lorenz <philip@bithub.de>2015-05-01 10:44:12 +0200
committerPhilip Lorenz <philip@bithub.de>2015-05-01 10:44:12 +0200
commit2548e981f8212cb2a11e2acce7e0de93b204177b (patch)
tree2e8de3650ff7a96ec0e9973c24aa82745680101b /astroid/exceptions.py
parentc0a30e623f5b7d28a2d1ca9adf6d50453dfc95a4 (diff)
downloadastroid-git-2548e981f8212cb2a11e2acce7e0de93b204177b.tar.gz
Ensure that generated enum values have the correct base classes
Enum values should share the same base classes as their defining class. If this is not the case it may lead to wrong inference results when an enum member is used - e.g. for the following snippet: class X(enum.IntEnum): one = 1 print([1, 2][X.one]) pylint will detect a "invalid-sequence-index" error as the __index__ method of X.one is not detected. --HG-- branch : enum-fixes
Diffstat (limited to 'astroid/exceptions.py')
0 files changed, 0 insertions, 0 deletions