Commit a3243af7 authored by Matthieu Boileau's avatar Matthieu Boileau
Browse files

Comply with doit 0.32.0

parent feab717d
Pipeline #5796 passed with stage
in 37 seconds
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
from doit.cmd_help import Help from doit.cmd_help import Help
from doit.doit_cmd import DoitMain from doit.doit_cmd import DoitMain
from doit.cmd_base import ModuleTaskLoader from doit.cmd_base import NamespaceTaskLoader
import inspect import inspect
...@@ -44,10 +44,9 @@ class MyDoit(DoitMain): ...@@ -44,10 +44,9 @@ class MyDoit(DoitMain):
return doit_help.get_usage(sub_cmds.to_dict()) return doit_help.get_usage(sub_cmds.to_dict())
class ClassTaskLoader(ModuleTaskLoader): class ClassTaskLoader(NamespaceTaskLoader):
"""Implementation of a loader of tasks from a Class namespace""" """Implementation of a loader of tasks from a Class namespace"""
def load_tasks(self, cmd, params, args): def __init__(self, classname):
# Build dict from class namespace super().__init__()
self.mod_dict = dict(inspect.getmembers(self.mod_dict)) self.namespace = dict(inspect.getmembers(classname))
return self._load_from(cmd, self.mod_dict, self.cmd_names)
...@@ -7,5 +7,5 @@ latex ...@@ -7,5 +7,5 @@ latex
markdown markdown
rise rise
pyyaml pyyaml
doit==0.31.1 doit>=0.32.0
python-frontmatter python-frontmatter
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment