Merge branch 'master' into master-to-features
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
""" hook specifications for pytest plugins, invoked from main.py and builtin plugins. """
|
||||
from typing import Any
|
||||
from typing import Optional
|
||||
|
||||
from pluggy import HookspecMarker
|
||||
|
||||
from _pytest.compat import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from _pytest.main import Session
|
||||
|
||||
|
||||
hookspec = HookspecMarker("pytest")
|
||||
|
||||
@@ -158,7 +166,7 @@ def pytest_load_initial_conftests(early_config, parser, args):
|
||||
|
||||
|
||||
@hookspec(firstresult=True)
|
||||
def pytest_collection(session):
|
||||
def pytest_collection(session: "Session") -> Optional[Any]:
|
||||
"""Perform the collection protocol for the given session.
|
||||
|
||||
Stops at first non-None result, see :ref:`firstresult`.
|
||||
|
||||
Reference in New Issue
Block a user