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

Regression: False positive I1101(c-extension-no-member) for math.iclose #5081

Closed
sam-s opened this issue Sep 27, 2021 · 2 comments · Fixed by #5529
Closed

Regression: False positive I1101(c-extension-no-member) for math.iclose #5081

sam-s opened this issue Sep 27, 2021 · 2 comments · Fixed by #5529

Comments

@sam-s
Copy link

sam-s commented Sep 27, 2021

Bug description

math.isclose has been around since 3.5, but now I am getting c-extension-no-member for it (I did not see that before).

The same error for ceil, log, sqrt &c

The same for resource.getrusage and zlib.crc32 (and other functions in those modules)

Also, no-member for dbm.gnu.open and socket.AF_INET.

File:

"https://github.com/PyCQA/pylint/issues/5081"
import math
math.isclose(1,2)

Configuration

No response

Command used

pylint a.py

Pylint output

************* Module a
a.py:3: [I1101(c-extension-no-member), ] Module 'math' has no 'isclose' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects.

Expected behavior

no diagnostics, as before

Pylint version

pylint 2.11.1
astroid 2.8.0
Python 3.9.7 (default, Sep  3 2021, 12:45:31) 
[Clang 12.0.0 (clang-1200.0.32.29)]

OS / Environment

No response

Additional dependencies

No response

@sam-s sam-s added Bug 🪲 Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Sep 27, 2021
@sam-s
Copy link
Author

sam-s commented Sep 27, 2021

Also I get

[E1101(no-member), ...] Instance of 'finfo' has no 'resolution' member

for np.finfo(np.float64).resolution despite extension-pkg-allow-list=numpy

@gregorgabrovsek
Copy link

I'm seeing the same issue myself. I'm using pylint 2.10.2 and Python 3.9.7.

@Pierre-Sassoulas Pierre-Sassoulas added macOS and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Dec 15, 2021
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.13.0 milestone Dec 15, 2021
Pierre-Sassoulas added a commit that referenced this issue Dec 15, 2021
Closes #3499
Closes #4302
Closes #4798
Closes #5081
Pierre-Sassoulas added a commit that referenced this issue Dec 19, 2021
Closes #1470
Closes #3499
Closes #4302
Closes #4798
Closes #5081
Pierre-Sassoulas added a commit that referenced this issue Dec 31, 2021
Closes #1470
Closes #3499
Closes #4302
Closes #4798
Closes #5081
Pierre-Sassoulas added a commit that referenced this issue Dec 31, 2021
Closes #1470
Closes #3499
Closes #4302
Closes #4798
Closes #5081
Pierre-Sassoulas added a commit to Pierre-Sassoulas/pylint that referenced this issue Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants