diff --git a/simplug.py b/simplug.py index c894acc..f6e60cd 100644 --- a/simplug.py +++ b/simplug.py @@ -791,7 +791,14 @@ def load_entrypoints( group: str | None = None, only: str | Iterable[str] = (), ) -> None: - """Load plugins from setuptools entry_points""" + """Load plugins from setuptools entry_points + + Args: + group: The group of the entry_points + only: The names of the entry_points to load. If it's a str, it + means only load this entry_point. If it's a list of str, it + means load all the entry_points in the list. + """ group = group or self.project if isinstance(only, str): diff --git a/tests/test_simplug.py b/tests/test_simplug.py index 4dee088..3b0493e 100644 --- a/tests/test_simplug.py +++ b/tests/test_simplug.py @@ -1133,7 +1133,7 @@ def hook(arg): f"{sys.executable} {plugin_dir}/setup.py " f"install --install-lib {install_dir} 1>/dev/null 2>/dev/null" ) - simplug.load_entrypoints(only="None") + simplug.load_entrypoints(only="None") # Nothing loaded assert simplug.hooks.hook(1) == [1] simplug.load_entrypoints()