blob: 307a431069bef559b77af98b38c3ce498b7ded2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
"""test access to undefined variables in Python 3 metaclass syntax """
# pylint: disable=no-init, invalid-name, too-few-public-methods
__revision__ = '$Id:'
import abc
from abc import ABCMeta
class Bad(metaclass=ABCMet):
""" Notice the typo """
class SecondBad(metaclass=ab.ABCMeta):
""" 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. """
data = abc
testdata = ABCMeta
|