diff options
author | Nathan Lovato <nathan@gdquest.com> | 2020-05-15 00:11:08 +0300 |
---|---|---|
committer | Nathan Lovato <nathan@gdquest.com> | 2020-05-15 00:13:35 +0300 |
commit | 55b820186e64b5362f8c3e808f160cbff49621a3 (patch) | |
tree | 7b68685720590985922e7f426f40f4e81126291a /power_sequencer/operators/__init__.py | |
parent | c9f09d722abbaeded92803fc8fbb3e286480b35e (diff) |
Power Sequencer: fix package name and import error
Fixes an error with not passing the python tests.
Diffstat (limited to 'power_sequencer/operators/__init__.py')
-rwxr-xr-x | power_sequencer/operators/__init__.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/power_sequencer/operators/__init__.py b/power_sequencer/operators/__init__.py index 3ab79520..a362b599 100755 --- a/power_sequencer/operators/__init__.py +++ b/power_sequencer/operators/__init__.py @@ -22,14 +22,18 @@ def get_operator_classes(): """Returns the list of operators in the add-on""" this_file = os.path.dirname(__file__) module_files = [ - f for f in os.listdir(this_file) if f.endswith(".py") and not f.startswith("__init__") + f + for f in os.listdir(this_file) + if f.endswith(".py") and not f.startswith("__init__") ] module_paths = ["." + os.path.splitext(f)[0] for f in module_files] classes = [] print(__name__) for path in module_paths: - module = importlib.import_module(path, package="blender_power_sequencer.operators") - operator_names = [entry for entry in dir(module) if entry.startswith("POWER_SEQUENCER_OT")] + module = importlib.import_module(path, package="power_sequencer.operators") + operator_names = [ + entry for entry in dir(module) if entry.startswith("POWER_SEQUENCER_OT") + ] classes.extend([getattr(module, name) for name in operator_names]) return classes @@ -38,7 +42,9 @@ doc = { "sequencer.refresh_all": { "name": "Refresh All", "description": "", - "shortcuts": [({"type": "R", "value": "PRESS", "shift": True}, {}, "Refresh All")], + "shortcuts": [ + ({"type": "R", "value": "PRESS", "shift": True}, {}, "Refresh All") + ], "demo": "", "keymap": "Sequencer", } |