Renaming of functions
Autoformatting
This commit is contained in:
parent
03005113b2
commit
e8197d5cea
@ -15,4 +15,4 @@ class CommandRunnerDebug(object):
|
|||||||
|
|
||||||
def run(self, module):
|
def run(self, module):
|
||||||
print("DEBUG RUNNER")
|
print("DEBUG RUNNER")
|
||||||
print(module.getCommand())
|
print(module.get_command())
|
||||||
|
@ -4,5 +4,5 @@ class IModule(object):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(IModule, self).__init__()
|
super(IModule, self).__init__()
|
||||||
|
|
||||||
def getCommand(self):
|
def get_command(self):
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
4
main.py
4
main.py
@ -1,4 +1,4 @@
|
|||||||
from CommandRunner import CommandRunner as Runner
|
from CommandRunner import CommandRunnerDebug as Runner
|
||||||
import importlib
|
import importlib
|
||||||
import os
|
import os
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ def get_modules():
|
|||||||
print("Module found: " + folder)
|
print("Module found: " + folder)
|
||||||
curr_module = importlib.import_module('.' + folder, package="modules")
|
curr_module = importlib.import_module('.' + folder, package="modules")
|
||||||
print("Try to load module: " + folder)
|
print("Try to load module: " + folder)
|
||||||
modules.append(curr_module.getModule())
|
modules.append(curr_module.get_module())
|
||||||
print("Module loaded successfully: " + folder)
|
print("Module loaded successfully: " + folder)
|
||||||
return modules
|
return modules
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from .sampleModule import SampleModule
|
from .sampleModule import SampleModule
|
||||||
|
|
||||||
|
|
||||||
def getModule():
|
def get_module():
|
||||||
return SampleModule()
|
return SampleModule()
|
||||||
|
@ -7,7 +7,7 @@ class SampleModule(IModule):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(SampleModule, self).__init__()
|
super(SampleModule, self).__init__()
|
||||||
|
|
||||||
def getCommand(self):
|
def get_command(self):
|
||||||
return [
|
return [
|
||||||
"command 1",
|
"command 1",
|
||||||
"command 2"
|
"command 2"
|
||||||
|
Loading…
Reference in New Issue
Block a user