Add pytest-lazyfixture stubs (#5745)

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 https://github.com/TvoroG/pytest-lazy-fixture/issues/51 the package needs to imported directly.

Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
kasium
2021-07-09 11:52:22 +02:00
committed by GitHub
parent aca5952361
commit c4a60ce94c
2 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1 @@
version = "0.6"

View File

@@ -0,0 +1,14 @@
from typing import Any, Iterable, overload
class LazyFixture:
name: str
def __init__(self, name: str) -> None: ...
def __eq__(self, other: object) -> bool: ...
@overload
def lazy_fixture(names: str) -> LazyFixture: ...
@overload
def lazy_fixture(names: Iterable[str]) -> list[LazyFixture] | Any: ...
def is_lazy_fixture(val: Any) -> bool: ...
def pytest_configure() -> None: ...
def __getattr__(name: str) -> Any: ... # incomplete