Skip to content

Commit

Permalink
hooks: add comment describing _hookimpls's format/invariants.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluetech committed Jan 20, 2024
1 parent 29912d7 commit 4577b45
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pluggy/_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,13 @@ def __init__(
#: Name of the hook getting called.
self.name: Final = name
self._hookexec: Final = hook_execute
# The hookimpls list. The caller iterates it *in reverse*. Format:
# 1. trylast nonwrappers
# 2. nonwrappers
# 3. tryfirst nonwrappers
# 4. trylast wrappers
# 5. wrappers
# 6. tryfirst wrappers
self._hookimpls: Final[list[HookImpl]] = []
self._call_history: _CallHistory | None = None
# TODO: Document, or make private.
Expand Down

0 comments on commit 4577b45

Please sign in to comment.