From 1dd41b0e2dbdd21e778aaa6c2185a4f8de100a41 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 9 Oct 2021 20:57:30 +0200 Subject: [PATCH] default value for recursive --- InvenTree/plugin/plugins.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/plugin/plugins.py b/InvenTree/plugin/plugins.py index e4ec361a38..d29b8093da 100644 --- a/InvenTree/plugin/plugins.py +++ b/InvenTree/plugin/plugins.py @@ -25,7 +25,7 @@ def iter_namespace(pkg): return pkgutil.iter_modules(pkg.__path__, pkg.__name__ + ".") -def get_modules(pkg, recursive): +def get_modules(pkg, recursive: bool = False): """get all modules in a package""" if not recursive: return [importlib.import_module(name) for finder, name, ispkg in iter_namespace(pkg)] @@ -49,7 +49,7 @@ def get_classes(module): return inspect.getmembers(module, inspect.isclass) -def get_plugins(pkg, baseclass, recursive): +def get_plugins(pkg, baseclass, recursive: bool = False): """ Return a list of all modules under a given package.