Skip to content

Commit ed12c9a

Browse files
committed
Add typing for FixtureRequest.param
For now, mark it as Any until #8073 is solved Fixes #9514
1 parent c2b1d5b commit ed12c9a

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ Nicholas Murphy
252252
Niclas Olofsson
253253
Nicolas Delaby
254254
Nikolay Kondratyev
255+
Nipunn Koorapati
255256
Olga Matoula
256257
Oleg Pidsadnyi
257258
Oleg Sushchenko

changelog/9514.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Type FixtureRequest.param as Any.

src/_pytest/fixtures.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def reorder_items_atscope(
345345
return items_done
346346

347347

348-
def get_direct_param_fixture_func(request):
348+
def get_direct_param_fixture_func(request: FixtureRequest) -> Any:
349349
return request.param
350350

351351

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

411412
@property
412413
def scope(self) -> "_ScopeName":

0 commit comments

Comments
 (0)