-
Notifications
You must be signed in to change notification settings - Fork 882
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
Pylint no-member and no-name-in-module warnings since version 4.6.0.66 #824
Comments
Most probably fixed in: |
Thanks for working on this @asmorkalov I tried with opencv-python-headless 4.8.0.74 and pylint 2.17.5. The pylint issue is not fixed. The new typing stubs work well though, mypy runs fine with the new opencv version. As a workaround, |
This issue is still present in
Looking at the PRs above, it looks like those are adding type stub files, however as far as I'm aware Could we perhaps re-open the ticket? Or I can submit another one if that's preferable. |
I also have the same problem, and would love for this issue to be reopened. Or for any new issue opened to be linked. |
I am still experiencing this problem. Adding '--extension-pkg-whitelist=cv2' in my vscode settings.json does not work for me, I have to use '--generated-members=cv2.*'. |
That sounds like a pylint issue, not an OpenCV one. Both mypy, pyright (and I'm sure more) can pickup on the stubs. Stubs should also always be prioritized over implementation when present. |
cc @avokin2 |
Note: Previously reported in #570, probably very related to #676.
Expected behaviour
Pylint was previously able to inspect cv2 member existence with the extension-pkg-whitelist parameter.
Actual behaviour
For opencv-python-4.6.0.66 (including the latest 4.7.0.72), pylint cannot inspect the members.
Workarounds
generated-members=cv2.*
pylint option (Useimport cv2
, notfrom cv2 import ...
, suggested in cv2 module members are not recognized pylint-dev/pylint#2426)Steps to reproduce
On Windows 10, Python 3.8 64bit, using Pylint 2.11.1:
With opencv-python-4.5.5.64:
With opencv-python-4.6.0.66 and the latest 4.7.0.72.:
Issue submission checklist
opencv-python
The text was updated successfully, but these errors were encountered: