Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

Show 'redefinition of function' when using property.setter #12

Open
vstoykov opened this issue May 28, 2012 · 1 comment
Open

Show 'redefinition of function' when using property.setter #12

vstoykov opened this issue May 28, 2012 · 1 comment

Comments

@vstoykov
Copy link

When in my code I have:

class Bar(object):
    @property
    def foo(self):
        return self._foo

    @foo.setter
    def foo(self, value):
        self._foo = value

This is absolutely valid python code but django lint tells me:

bar.py.XX: redefinition of function 'foo' from line XX

The info of django lint tells 'Django Lint is a wrapper around PyLint', but when I test this with pylint there is NO error like E:XXX,XX:Bar.foo: method already defined line XX

@lamby
Copy link
Owner

lamby commented May 28, 2012

Interesting, no idea why this is happening; we don't mess around with pylint's settings.

Using "property_i_just_defined.setter" is horribly ugly though ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants