Repository navigation
chore(structure): split hook modules into role-specific files - #6
Merged
Merged
Conversation
Reviewer's GuideRefactors pluggy’s internal hook machinery into role-specific modules while preserving the original public surface via re-export shims for backward compatibility. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/pluggy/_caller.py" line_range="271" />
<code_context>
+ """A proxy to another HookCaller which manages calls to all registered
+ plugins except the ones from remove_plugins."""
+
+ # This class is unusual: in inhertits from `HookCaller` so all of
+ # the *code* runs in the class, but it delegates all underlying *data*
+ # to the original HookCaller.
</code_context>
<issue_to_address>
**nitpick (typo):** Fix typo in comment: "inhertits" should be "inherits".
Please fix the spelling here so the comment remains clear for future maintainers, given it documents a subtle design choice.
```suggestion
# This class is unusual: it inherits from `HookCaller` so all of
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| """A proxy to another HookCaller which manages calls to all registered | ||
| plugins except the ones from remove_plugins.""" | ||
|
|
||
| # This class is unusual: in inhertits from `HookCaller` so all of |
There was a problem hiding this comment.
nitpick (typo): Fix typo in comment: "inhertits" should be "inherits".
Please fix the spelling here so the comment remains clear for future maintainers, given it documents a subtle design choice.
Suggested change
| # This class is unusual: in inhertits from `HookCaller` so all of | |
| # This class is unusual: it inherits from `HookCaller` so all of |
This was referenced Jul 24, 2026
refactor(caller): Protocol HookCaller, split callers, CompletionHook multicall
pytest-dev/pluggy#708
Draft
RonnyPfannschmidt
force-pushed
the
refactor/split-hook-modules
branch
from
July 24, 2026 16:53
8c3f2f7 to
7489fdb
Compare
RonnyPfannschmidt
force-pushed
the
refactor/split-hook-modules
branch
3 times, most recently
from
August 12, 2026 11:14
f795cf2 to
fcece74
Compare
This was referenced Aug 12, 2026
RonnyPfannschmidt
added this pull request to stack #12
September 12, 2026 18:31
RonnyPfannschmidt
force-pushed
the
refactor/split-hook-modules
branch
2 times, most recently
from
September 12, 2026 19:14
451ce94 to
d1439c6
Compare
RonnyPfannschmidt
force-pushed
the
refactor/split-hook-modules
branch
2 times, most recently
from
September 23, 2026 05:57
2c009ff to
4e3e55a
Compare
Move hook types, markers, callers, implementations, and multicall out of the monolithic _hooks/_callers modules so later typed-config and CompletionHook work can land without thrashing one huge file. Keep _hooks and _callers as re-export shims for import compatibility. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Cursor Grok 4.5 <grok@cursor.com>
RonnyPfannschmidt
force-pushed
the
refactor/split-hook-modules
branch
from
September 24, 2026 11:24
4e3e55a to
17d4ee9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Written by Grok 4.5 via Cursor for the pluggy maintainers; I prompted it, it did the work, I read it.
Review PR — step 1 of 7.
This PR targets the previous step's branch, so its diff is only this step's change. Review happens here. The corresponding upstream PR, which is the one that actually merges, is pytest-dev#703.
Merges happen upstream one step at a time, bottom-up. When step 1 lands upstream, this PR is closed and the rest of the stack is rebased onto the new
main.refactor/split-hook-modulesrefactor/configuration-objectsrefactor/markers-attach-configrefactor/hookimpl-wrapper-typesrefactor/hookcaller-and-executionrefactor/project-specrefactor/async-submitterChain step 01 of the internal-refactoring series.
Splits _hooks.py into role-specific modules (_config, _decorators, _caller, _impl, _execution) with _hooks.py kept as a compat re-export layer.
Part of the stacked chain: each PR in this chain targets the previous step's branch so it shows only its own diff. The full-diff PRs against pytest-dev/pluggy link back here.
Summary by Sourcery
Split the monolithic internal hooks module into role-specific modules while preserving backward-compatible re-exports.
Enhancements: