summaryrefslogtreecommitdiff
path: root/pylint/test/functional/member_checks.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2018-12-11 15:20:51 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2018-12-11 15:20:51 +0100
commit117ec26657e7d79b4d29e228394088453faa2527 (patch)
tree34cc295e2f3bdd8bf8ba5431adf7f3d2c15b1746 /pylint/test/functional/member_checks.py
parent1c057b0773ac3d352502f5b3526497c03ed13bd6 (diff)
downloadpylint-git-117ec26657e7d79b4d29e228394088453faa2527.tar.gz
``no-member`` is emitted for enums when they lack a member
Previously we weren't doing this because we detected a ``__getattr__`` implementation on the ``Enum`` class (and this check is skipped for classes with ``__getattr__``), but that is fine for Enums, given that they are inferred in a customised way in astroid. Close #2565
Diffstat (limited to 'pylint/test/functional/member_checks.py')
-rw-r--r--pylint/test/functional/member_checks.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/pylint/test/functional/member_checks.py b/pylint/test/functional/member_checks.py
index d4aef7c5f..cb6062676 100644
--- a/pylint/test/functional/member_checks.py
+++ b/pylint/test/functional/member_checks.py
@@ -1,5 +1,5 @@
# pylint: disable=print-statement,missing-docstring,no-self-use,too-few-public-methods,bare-except,broad-except, useless-object-inheritance
-# pylint: disable=using-constant-test,expression-not-assigned, assigning-non-slot, unused-variable,pointless-statement
+# pylint: disable=using-constant-test,expression-not-assigned, assigning-non-slot, unused-variable,pointless-statement, wrong-import-order, wrong-import-position
from __future__ import print_function
import six
class Provider(object):
@@ -197,3 +197,13 @@ class ClassWithMangledAttribute(object):
print(self.name + "xD")
ClassWithMangledAttribute()._ClassWithMangledAttribute__bar() # pylint: disable=protected-access
+
+
+import enum
+
+
+class Cls(enum.IntEnum):
+ Bar = 0
+
+
+SOME_VALUE = Cls.Baz # [no-member]