-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
6.0.0rc1 pytest.skip mypy error: Attribute function "__call__" ... does not accept self argument #7495
Comments
There is some trickery there but I can't reproduce it here, If you can provide steps for creating a standalone venv which reproduce this (package versions + configs) that'd be great. |
In particular, I suspect it's maybe an older mypy version -- which versions are you using, and if using an older version, can you reproduce with latest mypy? |
Thanks @bluetech for looking into this. we are pinned to mypy 0.730 at the moment. I'll get back to you on using different versions |
@bluetech I can confirm that I don't get this error from mypy 0.750 onwards but not sure which mypy commit fixed this. maybe as a result of 'more powerful self types'. What confuses me is that this issue looks a bit like python/mypy#6910 which is still open. Looking at the pytest code the annotation for __call__ in However, from a pandas standpoint, I'm happy to add cc @WillAyd One thing i've not checked is the Python version. I am using Python 3.8.3 and so Protocol is being used for |
ahh, just noticed the code comment
that's interesting. in pandas we normally just add an ignore for these cases. maybe python/mypy#2087 (comment) is relevant. |
As noted in the changelog, our type hints are developed against mypy 0.780 - and I think it's reasonable to require a recent version of mypy to use with the forthcoming major version of pytest. @The-Compiler @nicoddemus I suggest that we close this without action, save perhaps noting in the changelog that mypy versions before 0.750 are known to be incompatible. |
i'm OK with that from pandas perspective. |
pip list
from the virtual environment you are usingskip
is decorated with@_with_exception(Skipped)
, will look soon but assuming decorator is not preserving signatureThe text was updated successfully, but these errors were encountered: