Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid-overridden-method with nested property #4710

Merged
merged 1 commit into from Jul 14, 2021

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Jul 14, 2021

Description

invalid-overridden-method should not be raised if decorator has a nested property function.

def my_property(func):
    @property
    def _wrapper(self):
        pass

    return _wrapper


class A:
    @property
    def foo(self):
        return True

class B(A):
    @my_property
    def foo(self):
        return False

Type of Changes

Type
🐛 Bug fix

Related Issue

Closes #4368

@cdce8p cdce8p added the False Positive 🦟 A message is emitted but nothing is wrong with the code label Jul 14, 2021
@cdce8p cdce8p added this to the 2.9.4 milestone Jul 14, 2021
@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 92.055% when pulling 32b9e1f on cdce8p:fix-nested-property into bcac33e on PyCQA:main.

@cdce8p cdce8p merged commit 6c29598 into pylint-dev:main Jul 14, 2021
@cdce8p cdce8p deleted the fix-nested-property branch July 14, 2021 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False invalid-overridden-method positive with nested property
3 participants