Skip to content

Commit

Permalink
WIP: Add name parameter to PluginManager.load_setuptools_entrypoints
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Feb 7, 2019
1 parent cfba99d commit 42bfd78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pluggy/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def check_pending(self):
% (name, hookimpl.plugin),
)

def load_setuptools_entrypoints(self, entrypoint_name):
def load_setuptools_entrypoints(self, entrypoint_name, name=None):
""" Load modules from querying the specified setuptools entrypoint name.
Return the number of loaded plugins. """
from pkg_resources import (
Expand All @@ -260,7 +260,7 @@ def load_setuptools_entrypoints(self, entrypoint_name):
VersionConflict,
)

for ep in iter_entry_points(entrypoint_name):
for ep in iter_entry_points(entrypoint_name, name=name):
# is the plugin registered or blocked?
if self.get_plugin(ep.name) or self.is_blocked(ep.name):
continue
Expand Down

0 comments on commit 42bfd78

Please sign in to comment.