summaryrefslogtreecommitdiff
path: root/pylint/test/functional/undefined_variable_py30.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/test/functional/undefined_variable_py30.py')
-rw-r--r--pylint/test/functional/undefined_variable_py30.py26
1 files changed, 23 insertions, 3 deletions
diff --git a/pylint/test/functional/undefined_variable_py30.py b/pylint/test/functional/undefined_variable_py30.py
index 40cbdcc..712a096 100644
--- a/pylint/test/functional/undefined_variable_py30.py
+++ b/pylint/test/functional/undefined_variable_py30.py
@@ -45,14 +45,34 @@ class FalsePositive342(object):
top = 42
- def test_good(self, abc: top):
+ def test_good(self, bac: top):
""" top is defined at this moment. """
- def test_bad(self, abc: trop): # [undefined-variable]
+ def test_bad(self, bac: trop): # [undefined-variable]
""" trop is undefined at this moment. """
def test_bad1(self, *args: trop1): # [undefined-variable]
""" trop1 is undefined at this moment. """
- def test_bad2(self, **abc: trop2): # [undefined-variable]
+ def test_bad2(self, **bac: trop2): # [undefined-variable]
""" trop2 is undefined at this moment. """
+
+from abc import ABCMeta
+
+class Bad(metaclass=ABCMet): # [undefined-variable]
+ """ Notice the typo """
+
+class SecondBad(metaclass=ab.ABCMeta): # [undefined-variable]
+ """ Notice the `ab` module. """
+
+class Good(metaclass=int):
+ """ int is not a proper metaclass, but it is defined. """
+
+class SecondGood(metaclass=Good):
+ """ empty """
+
+class ThirdGood(metaclass=ABCMeta):
+ """ empty """
+
+class FourthGood(ThirdGood):
+ """ This should not trigger anything. """