summaryrefslogtreecommitdiff
path: root/src/_pytest/debugging.py
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2020-05-01 14:40:15 +0300
committerRan Benita <ran@unusedvar.com>2020-06-05 11:34:19 +0300
commit0fb081aec6cd8ed95882d6e63ce93bd7ee4ba6ae (patch)
tree4dea32fac417b67480c0732b3098186d2d98aa8f /src/_pytest/debugging.py
parentff8b7884e8f1019f60f270eab2c4909ff557dd4e (diff)
downloadpytest-0fb081aec6cd8ed95882d6e63ce93bd7ee4ba6ae.tar.gz
Type annotate some hookspecs & impls
Annotate some "easy" arguments of hooks that repeat in a lot of internal plugins. Not all of the arguments are annotated fully for now.
Diffstat (limited to 'src/_pytest/debugging.py')
-rw-r--r--src/_pytest/debugging.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/_pytest/debugging.py b/src/_pytest/debugging.py
index 26c3095dc..0085d3197 100644
--- a/src/_pytest/debugging.py
+++ b/src/_pytest/debugging.py
@@ -4,8 +4,11 @@ import functools
import sys
from _pytest import outcomes
+from _pytest.config import Config
from _pytest.config import ConftestImportFailure
from _pytest.config import hookimpl
+from _pytest.config import PytestPluginManager
+from _pytest.config.argparsing import Parser
from _pytest.config.exceptions import UsageError
@@ -20,7 +23,7 @@ def _validate_usepdb_cls(value):
return (modname, classname)
-def pytest_addoption(parser):
+def pytest_addoption(parser: Parser) -> None:
group = parser.getgroup("general")
group._addoption(
"--pdb",
@@ -44,7 +47,7 @@ def pytest_addoption(parser):
)
-def pytest_configure(config):
+def pytest_configure(config: Config) -> None:
import pdb
if config.getvalue("trace"):
@@ -74,8 +77,8 @@ def pytest_configure(config):
class pytestPDB:
""" Pseudo PDB that defers to the real pdb. """
- _pluginmanager = None
- _config = None
+ _pluginmanager = None # type: PytestPluginManager
+ _config = None # type: Config
_saved = [] # type: list
_recursive_debug = 0
_wrapped_pdb_cls = None