<reponame>jnthn/intellij-community<filename>python/testData/inspections/PyDataclassInspection/attrsInitializersAndValidators.py<gh_stars>1-10
import attr


@attr.s
class A:
    x = attr.ib()

    @x.default
    def init_x1(self):
        return 10

    @x.validator
    def check_x1(self, attribute, value):
        pass


@attr.s
class A:
    x = attr.ib()

    @x.default
    def init_x2<error descr="'init_x2' should take only 1 parameter">(self, attribute, value)</error>:
        return 10

    @x.validator
    def check_x2<error descr="'check_x2' should take only 3 parameters">(self)</error>:
        pass