-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Add pytest-lazyfixture stubs #5745
Conversation
This change will add stubs for pytest-lazyfixture. It is particual useful for projects which type their tests and use pytest-lazyfixture. The included functions and classes are the scope which can be considered documented by the module. Any other function is related to pytest hook implementations and are normally not called by an user. Please note, that if a user uses 'pytest.lazy_fixture' these stubs will not work. As recommneded in TvoroG/pytest-lazy-fixture#51 the package needs to imported directly.
The tests are failing with
No clue why this affects Pillow |
Please rename |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Stubtest error is not related to this PR. See Fix stubtest PIL error #5746
- Some functions are missing, such as
sorted_by_dependency
. Consider adding a module-level__getattr__
to mark the stub as incomplete.
I merged our master branch to this branch to fix the PIL error. You will need to |
New Error: |
Co-authored-by: Akuli <[email protected]>
Thanks a lot for all the help and explanations! |
I think the file should be named |
That makes sense :-) |
@Akuli I have a question: So pytest-lazyfixture injects an attribute into pytest so that pytest.lazy_fixture is accessible. Is it possible to somehow reflect this in the stubs? Please note, that pytest is completely typed and I'm not sure if it's possible to merge type information |
That's not something we can do in typeshed, because we don't have pytest stubs. This would need to be added to pytest's
But then |
Thanks a lot! |
This change will add stubs for pytest-lazyfixture. It is particual useful for projects which type their tests and use pytest-lazyfixture.
The included functions and classes are the scope which can be considered documented by the module. Any other function is related to pytest hook implementations and are normally not called by an user.
Please note, that if a user uses 'pytest.lazy_fixture' these stubs will not work. As recommneded in TvoroG/pytest-lazy-fixture#51 the package needs to imported directly.