Skip to content

Commit

Permalink
[8.2.x] Clarify pytest_ignore_collect docs (#12386)
Browse files Browse the repository at this point in the history
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
  • Loading branch information
github-actions[bot] and nicoddemus authored May 28, 2024
1 parent 240a252 commit 1d103e5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/_pytest/hookspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,12 @@ def pytest_collection_finish(session: "Session") -> None:
def pytest_ignore_collect(
collection_path: Path, path: "LEGACY_PATH", config: "Config"
) -> Optional[bool]:
"""Return True to prevent considering this path for collection.
"""Return ``True`` to ignore this path for collection.
Return ``None`` to let other plugins ignore the path for collection.
Returning ``False`` will forcefully *not* ignore this path for collection,
without giving a chance for other plugins to ignore this path.
This hook is consulted for all files and directories prior to calling
more specific hooks.
Expand Down

0 comments on commit 1d103e5

Please sign in to comment.