Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthieu Boileau
nbcourse
Commits
a3243af7
Commit
a3243af7
authored
Dec 17, 2019
by
Matthieu Boileau
Browse files
Comply with doit 0.32.0
parent
feab717d
Pipeline
#5796
passed with stage
in 37 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nbcourse/mydoit.py
View file @
a3243af7
...
...
@@ -2,7 +2,7 @@
from
doit.cmd_help
import
Help
from
doit.doit_cmd
import
DoitMain
from
doit.cmd_base
import
Modul
eTaskLoader
from
doit.cmd_base
import
Namespac
eTaskLoader
import
inspect
...
...
@@ -44,10 +44,9 @@ class MyDoit(DoitMain):
return
doit_help
.
get_usage
(
sub_cmds
.
to_dict
())
class
ClassTaskLoader
(
Modul
eTaskLoader
):
class
ClassTaskLoader
(
Namespac
eTaskLoader
):
"""Implementation of a loader of tasks from a Class namespace"""
def
load_tasks
(
self
,
cmd
,
params
,
args
):
# Build dict from class namespace
self
.
mod_dict
=
dict
(
inspect
.
getmembers
(
self
.
mod_dict
))
return
self
.
_load_from
(
cmd
,
self
.
mod_dict
,
self
.
cmd_names
)
def
__init__
(
self
,
classname
):
super
().
__init__
()
self
.
namespace
=
dict
(
inspect
.
getmembers
(
classname
))
requirements.txt
View file @
a3243af7
...
...
@@ -7,5 +7,5 @@ latex
markdown
rise
pyyaml
doit
=
=0.3
1.1
doit
>
=0.3
2.0
python-frontmatter
\ No newline at end of file
Matthieu Boileau
@boileau
mentioned in issue
#19 (closed)
·
Dec 17, 2019
mentioned in issue
#19 (closed)
mentioned in issue #19
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment