Skip to content

Commit

Permalink
Reorder params, make optional kw args
Browse files Browse the repository at this point in the history
  • Loading branch information
LightArrowsEXE committed Sep 29, 2024
1 parent da257af commit 520bdae
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions vstools/dependencies/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,20 @@ def __post_init__(self) -> None:
def add_plugin(
self,
dependency: str,
parent_package: str | None = None,
functions: Iterable[str] | None = None,
*,
url: str | None = None,
parent_package: str | None = None,
optional: bool = False,
) -> None:
"""
Register a plugin for a package.
:param dependency: The name of the plugin to depend on.
:param parent_package: The name of the package that depends on this plugin.
:param functions: A list of functions used by the plugin.
A check is performed to ensure the installed plugin has these functions.
:param url: The url to the plugin's download page. Defaults to None.
:param parent_package: The name of the package that depends on this plugin.
:param optional: Whether the plugin is optional. Defaults to False.
"""

Expand Down Expand Up @@ -125,8 +126,9 @@ def add_package(
self,
dependency: str,
parent_package: str | None = None,
version: str | None = None,
functions: str | list[str] | None = None,
*,
version: str | None = None,
optional: bool = False,
url: str | None = None,
) -> None:
Expand All @@ -135,9 +137,9 @@ def add_package(
:param dependency: The name of the dependency to register.
:param parent_package: The name of the package that depends on this dependency.
:param version: The required version of the dependency. Defaults to None.
:param functions: A function or list of functions to check for in the dependency.
Defaults to None.
:param version: The required version of the dependency. Defaults to None.
:param optional: Whether the dependency is optional. Defaults to False.
:param url: The url to the dependency's download page. Defaults to None.
"""
Expand Down

0 comments on commit 520bdae

Please sign in to comment.