-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Missing Attribute Error on pytest.fixture #6331
Comments
There is no way mypy can detect this. Potentially, one can write a mypy plugin (but again mypy core team has no bandwidth for this). Your best choice for now is just to use |
Ok thank you, I assume the comment is put at the top of the source file? |
On the line with error. |
Is there a way to ignore all instances of the same error? |
Ignoring part of a file is not implemented yet, see #626. You can however just add |
It may also be helpful to explicitly declare the attribute that mypy thinks is missing in the class body. |
Please provide more information to help us understand the issue:
This is potentially both a bug and a feature request.
self.driver is the pytest fixture from a conftest file and is just a wrapper for selenium (unimportant)
Output of mypy --disallow-untyped-defs --ignore-missing-imports test_neat.py:
I was hoping it would detect the fixture and move on
Environ:
I can try installing from master if anyone feels like that will fix the issue, just curious what I can do to either: fix the issue or ignore these particular errors.
The text was updated successfully, but these errors were encountered: