1

I use pylint and gmpy2 on Kali Linux(WSL2). Pylint makes many complaints about being unable to find gmpy2 members. How can I avoid this?

Here is a little example:

import gmpy2
print(gmpy2.is_even(6))

And the result of pylint is

tst.py:2:6: E1101: Module 'gmpy2' has no 'is_even' member (no-member)

I also tried this on ArchLinux, the result is the same.

1 Answer 1

2

According to the document

If you are getting the dreaded no-member error, there is a possibility that either pylint found a bug in your code or that it actually tries to lint a C extension module.

Linting C extension modules is not supported out of the box, especially since pylint has no way to get an AST object out of the extension module.

You should add extension-pkg-whitelist argument in command line or the pylintrc file.

Here is the original issue I opened in the Github.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.