Type annotate main.py and some parts related to collection

This commit is contained in:
Ran Benita
2020-05-01 14:40:15 +03:00
parent f8de424241
commit be00e12d47
9 changed files with 175 additions and 75 deletions

View File

@@ -404,10 +404,10 @@ class SetupState:
raise e
def collect_one_node(collector):
def collect_one_node(collector: Collector) -> CollectReport:
ihook = collector.ihook
ihook.pytest_collectstart(collector=collector)
rep = ihook.pytest_make_collect_report(collector=collector)
rep = ihook.pytest_make_collect_report(collector=collector) # type: CollectReport
call = rep.__dict__.pop("call", None)
if call and check_interactive_exception(call, rep):
ihook.pytest_exception_interact(node=collector, call=call, report=rep)