mirror of
https://fuchsia.googlesource.com/third_party/github.com/pylint-dev/pylint
synced 2024-09-21 16:19:21 +00:00
1a8aa86961
* Add C0204 for __new__ method of metaclass. * Add valid-metaclass-classmethod-first-arg config option. * Move a test, improve it and fix another one.
21 lines
469 B
Python
21 lines
469 B
Python
# pylint: disable=R0903
|
|
"""test attribute access on metaclass"""
|
|
|
|
|
|
__revision__ = 'yo'
|
|
|
|
class Meta(type):
|
|
"""the meta class"""
|
|
def __init__(cls, name, bases, dictionary):
|
|
super(Meta, cls).__init__(name, bases, dictionary)
|
|
print cls, cls._meta_args
|
|
delattr(cls, '_meta_args')
|
|
|
|
class Test(object):
|
|
"""metaclassed class"""
|
|
__metaclass__ = Meta
|
|
_meta_args = ('foo', 'bar')
|
|
|
|
def __init__(self):
|
|
print '__init__', self
|