Skip to content

Commit

Permalink
feat: allow create_plugin() to pass arguments to plugin class const…
Browse files Browse the repository at this point in the history
…ructor
  • Loading branch information
akaihola committed Jan 11, 2025
1 parent 84706ab commit 1cc1108
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/darkgraylib/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ def get_plugin_class(entry_point_group: str, name: str) -> Type:
return plugin_class

Check failure on line 38 in src/darkgraylib/plugins.py

View workflow job for this annotation

GitHub Actions / Mypy

src/darkgraylib/plugins.py#L38

Returning Any from function declared to return "type[Any]" [no-any-return]


def create_plugin(entry_point_group: str, name: str) -> Type:
return get_plugin_class(entry_point_group, name)()
def create_plugin(entry_point_group: str, name: str, *args, **kwargs) -> Type:

Check failure on line 41 in src/darkgraylib/plugins.py

View workflow job for this annotation

GitHub Actions / Mypy

src/darkgraylib/plugins.py#L41

Function is missing a type annotation for one or more arguments [no-untyped-def]

Check failure on line 41 in src/darkgraylib/plugins.py

View workflow job for this annotation

GitHub Actions / Mypy

src/darkgraylib/plugins.py#L41

Missing type parameters for generic type "Type" [type-arg]

Check failure on line 41 in src/darkgraylib/plugins.py

View workflow job for this annotation

GitHub Actions / Pylint

src/darkgraylib/plugins.py#L41

Missing function or method docstring (missing-function-docstring, C0116)
return get_plugin_class(entry_point_group, name)(*args, **kwargs)

Check failure on line 42 in src/darkgraylib/plugins.py

View workflow job for this annotation

GitHub Actions / Mypy

src/darkgraylib/plugins.py#L42

Returning Any from function declared to return "type[Any]" [no-any-return]

0 comments on commit 1cc1108

Please sign in to comment.