Skip to content

Commit

Permalink
Add typing for FixtureRequest.param
Browse files Browse the repository at this point in the history
For now, mark it as Any until pytest-dev#8073 is solved

Fixes pytest-dev#9514
  • Loading branch information
nipunn1313 committed Jul 14, 2022
1 parent c2b1d5b commit 895164c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ Nicholas Murphy
Niclas Olofsson
Nicolas Delaby
Nikolay Kondratyev
Nipunn Koorapati
Olga Matoula
Oleg Pidsadnyi
Oleg Sushchenko
Expand Down
1 change: 1 addition & 0 deletions changelog/9514.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Type FixtureRequest.param as Any.
3 changes: 2 additions & 1 deletion src/_pytest/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def reorder_items_atscope(
return items_done


def get_direct_param_fixture_func(request):
def get_direct_param_fixture_func(request: "FixtureRequest") -> Any:
return request.param


Expand Down Expand Up @@ -407,6 +407,7 @@ def __init__(self, pyfuncitem, *, _ispytest: bool = False) -> None:
self._arg2fixturedefs = fixtureinfo.name2fixturedefs.copy()
self._arg2index: Dict[str, int] = {}
self._fixturemanager: FixtureManager = pyfuncitem.session._fixturemanager
self.param: Any

@property
def scope(self) -> "_ScopeName":
Expand Down

0 comments on commit 895164c

Please sign in to comment.