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

no-member raised on __getattribute__ for modules #6094

Open
quazgar opened this issue Apr 1, 2022 · 0 comments · May be fixed by #6402
Open

no-member raised on __getattribute__ for modules #6094

quazgar opened this issue Apr 1, 2022 · 0 comments · May be fixed by #6402
Labels
Astroid Related to astroid False Positive 🦟 A message is emitted but nothing is wrong with the code

Comments

@quazgar
Copy link

quazgar commented Apr 1, 2022

Bug description

In the following code snippet, pylint complains about line 3 with E1101: Module 'sys' has no '__getattribute__' member (no-member):

import sys

print(sys.__getattribute__("argv"))
print(sys.__dict__)

s = "hello"
print(s.__getattribute__("capitalize")())

Note that this seems to be OK for other usages of __getattribute__.

Configuration

No response

Command used

`pylint test.py`

Pylint output

************* Module caosadvancedtools.models.test
test.py:1:0: C0114: Missing module docstring (missing-module-docstring)
test.py:3:6: E1101: Module 'sys' has no '__getattribute__' member (no-member)
test.py:6:0: C0103: Constant name "s" doesn't conform to UPPER_CASE naming style (invalid-name)

--------------------------------------------------------------------
Your code has been rated at -4.00/10 (previous run: -4.00/10, +0.00)

Expected behavior

Line 3 should be just as OK as line 7.

Pylint version

pylint 2.12.2
astroid 2.9.3
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110]

OS / Environment

Debian 11

Additional dependencies

No response

@quazgar quazgar added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Apr 1, 2022
@jacobtylerwalls jacobtylerwalls added Astroid Related to astroid False Positive 🦟 A message is emitted but nothing is wrong with the code and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Apr 18, 2022
@jacobtylerwalls jacobtylerwalls added this to the 2.14.0 milestone Apr 19, 2022
jacobtylerwalls added a commit to jacobtylerwalls/pylint that referenced this issue Apr 19, 2022
@jacobtylerwalls jacobtylerwalls linked a pull request Apr 19, 2022 that will close this issue
Pierre-Sassoulas pushed a commit to jacobtylerwalls/pylint that referenced this issue May 2, 2022
@Pierre-Sassoulas Pierre-Sassoulas modified the milestones: 2.14.0, 2.15.0 May 2, 2022
@jacobtylerwalls jacobtylerwalls modified the milestones: 2.15.0, 2.16.0 Jul 17, 2022
@jacobtylerwalls jacobtylerwalls modified the milestones: 2.16.0, 2.17.0 Nov 20, 2022
@Pierre-Sassoulas Pierre-Sassoulas modified the milestones: 2.17.0, 3.0.0 Mar 7, 2023
@Pierre-Sassoulas Pierre-Sassoulas removed this from the 3.0.0 milestone Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Astroid Related to astroid False Positive 🦟 A message is emitted but nothing is wrong with the code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants