Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/pluggy/_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,10 @@ def subset_hook_caller(
method which manages calls to all registered plugins except the ones
from remove_plugins."""
orig: HookCaller = getattr(self.hook, name)
plugins_to_remove = {plug for plug in remove_plugins if hasattr(plug, name)}
registered_plugins = {impl.plugin for impl in orig._hookimpls}
plugins_to_remove = {
plug for plug in remove_plugins if plug in registered_plugins
}
if plugins_to_remove:
return _SubsetHookCaller(orig, plugins_to_remove)
return orig
Expand Down