Renaming of functions

Autoformatting
This commit is contained in:
Marcel Schwarz 2019-12-14 04:26:02 +01:00
parent 03005113b2
commit e8197d5cea
5 changed files with 9 additions and 9 deletions

View File

@ -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())

View File

@ -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

View File

@ -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

View File

@ -1,5 +1,5 @@
from .sampleModule import SampleModule from .sampleModule import SampleModule
def getModule(): def get_module():
return SampleModule() return SampleModule()

View File

@ -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"