Skip to content

Commit 2678b13

Browse files
authored
Merge pull request #970 from michaelaye/extended_fix_953
Extended fix 953
2 parents 1089cd3 + 2f6f1e1 commit 2678b13

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

nbdev/maker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def _retr_mdoc(cells):
178178
"Search for `_doc_` variable, used to create module docstring"
179179
trees = L(cells).map(NbCell.parsed_).concat()
180180
for o in trees:
181-
if isinstance(o, _assign_types) and getattr(o.targets[0],'id',None)=='_doc_':
181+
if isinstance(o, _assign_types) and getattr(_targets(o)[0],'id',None)=='_doc_':
182182
v = try_attrs(o.value, 'value', 's') # py37 uses `ast.Str.s`
183183
return f'"""{v}"""\n\n'
184184
return ""

nbs/09_API/02_maker.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@
470470
" \"Search for `_doc_` variable, used to create module docstring\"\n",
471471
" trees = L(cells).map(NbCell.parsed_).concat()\n",
472472
" for o in trees:\n",
473-
" if isinstance(o, _assign_types) and getattr(o.targets[0],'id',None)=='_doc_':\n",
473+
" if isinstance(o, _assign_types) and getattr(_targets(o)[0],'id',None)=='_doc_':\n",
474474
" v = try_attrs(o.value, 'value', 's') # py37 uses `ast.Str.s`\n",
475475
" return f'\"\"\"{v}\"\"\"\\n\\n' \n",
476476
" return \"\""

0 commit comments

Comments
 (0)