提交 aa4e1397 编写于 作者: W wuzewu

Fix typo

上级 7351c1c7
...@@ -234,7 +234,7 @@ class RunCommand(BaseCommand): ...@@ -234,7 +234,7 @@ class RunCommand(BaseCommand):
return False return False
# If the module is not executable, give an alarm and exit # If the module is not executable, give an alarm and exit
if not self.module.is_runable: if not self.module.is_runnable:
print("ERROR! Module %s is not executable." % module_name) print("ERROR! Module %s is not executable." % module_name)
return False return False
......
...@@ -121,12 +121,12 @@ def create_module(directory, name, author, email, module_type, summary, ...@@ -121,12 +121,12 @@ def create_module(directory, name, author, email, module_type, summary,
os.chdir(_cwd) os.chdir(_cwd)
_module_runable_func = {} _module_runnable_func = {}
def runable(func): def runnable(func):
mod = func.__module__ + "." + inspect.stack()[1][3] mod = func.__module__ + "." + inspect.stack()[1][3]
_module_runable_func[mod] = func.__name__ _module_runnable_func[mod] = func.__name__
def _wrapper(*args, **kwargs): def _wrapper(*args, **kwargs):
return func(*args, **kwargs) return func(*args, **kwargs)
...@@ -169,8 +169,8 @@ class Module(object): ...@@ -169,8 +169,8 @@ class Module(object):
Module._record[id(self)] = True Module._record[id(self)] = True
mod = self.__class__.__module__ + "." + self.__class__.__name__ mod = self.__class__.__module__ + "." + self.__class__.__name__
if mod in _module_runable_func: if mod in _module_runnable_func:
_run_func_name = _module_runable_func[mod] _run_func_name = _module_runnable_func[mod]
self._run_func = getattr(self, _run_func_name) self._run_func = getattr(self, _run_func_name)
else: else:
self._run_func = None self._run_func = None
...@@ -272,7 +272,7 @@ class Module(object): ...@@ -272,7 +272,7 @@ class Module(object):
return self._code_version return self._code_version
@property @property
def is_runable(self): def is_runnable(self):
return self._run_func != None return self._run_func != None
def _initialize(self): def _initialize(self):
...@@ -556,7 +556,7 @@ class ModuleV1(Module): ...@@ -556,7 +556,7 @@ class ModuleV1(Module):
raise ValueError("This Module is not callable!") raise ValueError("This Module is not callable!")
@property @property
def is_runable(self): def is_runnable(self):
return self.default_signature != None return self.default_signature != None
def context(self, def context(self,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册