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

Duplicate not-callable on property members #4426

Closed
nelfin opened this issue May 1, 2021 · 0 comments · Fixed by #5185
Closed

Duplicate not-callable on property members #4426

nelfin opened this issue May 1, 2021 · 0 comments · Fixed by #5185
Labels
Milestone

Comments

@nelfin
Copy link
Contributor

nelfin commented May 1, 2021

Steps to reproduce

# pylint: disable=missing-docstring,pointless-statement,invalid-name

class A:
    @property
    def value(self):
        return 42


a = A()
a.value()  # [not-callable]

Current behavior

************* Module regression_duplicate_notcallable_with_property
tests/functional/r/regression/regression_duplicate_notcallable_with_property.py:10:0: E1102: a.value is not callable (not-callable)
tests/functional/r/regression/regression_duplicate_notcallable_with_property.py:10:0: E1102: a.value is not callable (not-callable)

Expected behavior

Only a single instance of not-callable to be reported, e.g.

************* Module regression_duplicate_notcallable_with_property
tests/functional/r/regression/regression_duplicate_notcallable_with_property.py:10:0: E1102: a.value is not callable (not-callable)

pylint --version output

Result of pylint --version output:

pylint 2.7.5.dev163+g841c51c
astroid 2.5.6
Python 3.9.0 (default, Nov 30 2020, 15:33:28) 
[GCC 5.4.0 20160609]
nelfin added a commit to nelfin/pylint that referenced this issue May 1, 2021
@Pierre-Sassoulas Pierre-Sassoulas added the False Positive 🦟 A message is emitted but nothing is wrong with the code label May 1, 2021
@cdce8p cdce8p added Bug 🪲 and removed False Positive 🦟 A message is emitted but nothing is wrong with the code labels May 13, 2021
DanielNoord added a commit to DanielNoord/pylint that referenced this issue Oct 19, 2021
@DanielNoord DanielNoord added this to the 2.12.0 milestone Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants