forked from enviPath/enviPy
[Chore] Linted Files (#150)
Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#150
This commit is contained in:
@ -23,11 +23,11 @@ def install_wheel(wheel_path):
|
||||
|
||||
def extract_package_name_from_wheel(wheel_filename):
|
||||
# Example: my_plugin-0.1.0-py3-none-any.whl -> my_plugin
|
||||
return wheel_filename.split('-')[0]
|
||||
return wheel_filename.split("-")[0]
|
||||
|
||||
|
||||
def ensure_plugins_installed():
|
||||
wheel_files = glob.glob(os.path.join(s.PLUGIN_DIR, '*.whl'))
|
||||
wheel_files = glob.glob(os.path.join(s.PLUGIN_DIR, "*.whl"))
|
||||
|
||||
for wheel_path in wheel_files:
|
||||
wheel_filename = os.path.basename(wheel_path)
|
||||
@ -45,7 +45,7 @@ def discover_plugins(_cls: Type = None) -> Dict[str, Type]:
|
||||
|
||||
plugins = {}
|
||||
|
||||
for entry_point in importlib.metadata.entry_points(group='enviPy_plugins'):
|
||||
for entry_point in importlib.metadata.entry_points(group="enviPy_plugins"):
|
||||
try:
|
||||
plugin_class = entry_point.load()
|
||||
if _cls:
|
||||
@ -54,9 +54,9 @@ def discover_plugins(_cls: Type = None) -> Dict[str, Type]:
|
||||
plugins[instance.name()] = instance
|
||||
else:
|
||||
if (
|
||||
issubclass(plugin_class, Classifier)
|
||||
or issubclass(plugin_class, Descriptor)
|
||||
or issubclass(plugin_class, Property)
|
||||
issubclass(plugin_class, Classifier)
|
||||
or issubclass(plugin_class, Descriptor)
|
||||
or issubclass(plugin_class, Property)
|
||||
):
|
||||
instance = plugin_class()
|
||||
plugins[instance.name()] = instance
|
||||
|
||||
Reference in New Issue
Block a user