summaryrefslogtreecommitdiff
path: root/src/_pytest/setuponly.py
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2020-08-01 13:06:13 +0300
committerRan Benita <ran@unusedvar.com>2020-08-01 20:39:15 +0300
commitbe656dd4e4444acd9600660fc3b6bf3896067dbe (patch)
treeea7998a38648f2397a818ad8f9948d2048e3b631 /src/_pytest/setuponly.py
parent49827adcb9256c9c9c06a25729421dcc3c385edc (diff)
downloadpytest-be656dd4e4444acd9600660fc3b6bf3896067dbe.tar.gz
typing: set disallow_any_generics
This prevents referring to a generic type without filling in its generic type parameters. The FixtureDef typing might need some more refining in the future.
Diffstat (limited to 'src/_pytest/setuponly.py')
-rw-r--r--src/_pytest/setuponly.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/_pytest/setuponly.py b/src/_pytest/setuponly.py
index dfd01cc76..44a1094c0 100644
--- a/src/_pytest/setuponly.py
+++ b/src/_pytest/setuponly.py
@@ -29,7 +29,7 @@ def pytest_addoption(parser: Parser) -> None:
@pytest.hookimpl(hookwrapper=True)
def pytest_fixture_setup(
- fixturedef: FixtureDef, request: SubRequest
+ fixturedef: FixtureDef[object], request: SubRequest
) -> Generator[None, None, None]:
yield
if request.config.option.setupshow:
@@ -47,7 +47,7 @@ def pytest_fixture_setup(
_show_fixture_action(fixturedef, "SETUP")
-def pytest_fixture_post_finalizer(fixturedef: FixtureDef) -> None:
+def pytest_fixture_post_finalizer(fixturedef: FixtureDef[object]) -> None:
if fixturedef.cached_result is not None:
config = fixturedef._fixturemanager.config
if config.option.setupshow:
@@ -56,7 +56,7 @@ def pytest_fixture_post_finalizer(fixturedef: FixtureDef) -> None:
del fixturedef.cached_param # type: ignore[attr-defined]
-def _show_fixture_action(fixturedef: FixtureDef, msg: str) -> None:
+def _show_fixture_action(fixturedef: FixtureDef[object], msg: str) -> None:
config = fixturedef._fixturemanager.config
capman = config.pluginmanager.getplugin("capturemanager")
if capman: