Skip to content

Commit e618aa0

Browse files
committed
fix import
1 parent 90ef61a commit e618aa0

File tree

4 files changed

+18
-24
lines changed

4 files changed

+18
-24
lines changed

‎nbdev/processors.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def __call__(self, cell):
249249
if _do_eval(cell): self.k.cell(cell)
250250
title = fm.get('title', '')
251251
if self.k.exc:
252-
raise Exception(f"Error{' in notebook: '+title if title else ''} in cell {cell.idx_} :\n{cell.source}") from self.k.exc[1]
252+
raise Exception(f"Error{' in notebook: '+title if title else ''} in cell {cell.idx_} :\n{cell.source}") from self.k.exc
253253

254254
def end(self):
255255
try: from ipywidgets import Widget

‎nbs/api/05_doclinks.ipynb‎

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -428,16 +428,6 @@
428428
" return syms"
429429
]
430430
},
431-
{
432-
"cell_type": "code",
433-
"execution_count": null,
434-
"metadata": {},
435-
"outputs": [],
436-
"source": [
437-
"url = 'https://docs.python.org/3'\n",
438-
"syms = create_index(url)"
439-
]
440-
},
441431
{
442432
"cell_type": "code",
443433
"execution_count": null,
@@ -464,20 +454,16 @@
464454
}
465455
],
466456
"source": [
467-
"dict(list(syms['builtins'].items())[:10])"
468-
]
469-
},
470-
{
471-
"cell_type": "code",
472-
"execution_count": null,
473-
"metadata": {},
474-
"outputs": [],
475-
"source": [
457+
"url = 'https://docs.python.org/3'\n",
458+
"syms = create_index(url)\n",
459+
"\n",
476460
"for b in syms['builtins']:\n",
477461
" b = b.split('.')\n",
478462
" if len(b) != 2: continue\n",
479463
" b = b[1]\n",
480-
" assert b in bset"
464+
" assert b in bset\n",
465+
"\n",
466+
"dict(list(syms['builtins'].items())[:10])"
481467
]
482468
},
483469
{
@@ -1110,6 +1096,15 @@
11101096
"You can also use NbdevLookup with import aliases like the following:"
11111097
]
11121098
},
1099+
{
1100+
"cell_type": "code",
1101+
"execution_count": null,
1102+
"metadata": {},
1103+
"outputs": [],
1104+
"source": [
1105+
"import numpy as np"
1106+
]
1107+
},
11131108
{
11141109
"cell_type": "code",
11151110
"execution_count": null,
@@ -1127,7 +1122,6 @@
11271122
}
11281123
],
11291124
"source": [
1130-
"import numpy as np\n",
11311125
"NbdevLookup(ns=globals()).linkify('this is an aliased import link `np.array`')"
11321126
]
11331127
},

‎nbs/api/10_processors.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@
719719
" if _do_eval(cell): self.k.cell(cell)\n",
720720
" title = fm.get('title', '')\n",
721721
" if self.k.exc: \n",
722-
" raise Exception(f\"Error{' in notebook: '+title if title else ''} in cell {cell.idx_} :\\n{cell.source}\") from self.k.exc[1]\n",
722+
" raise Exception(f\"Error{' in notebook: '+title if title else ''} in cell {cell.idx_} :\\n{cell.source}\") from self.k.exc\n",
723723
"\n",
724724
" def end(self):\n",
725725
" try: from ipywidgets import Widget\n",

‎nbs/nbdev.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ website:
66
site-url: "https://nbdev.fast.ai/"
77
description: "Create delightful software with Jupyter Notebooks"
88
repo-branch: master
9-
repo-url: "https://github.com/fastai/nbdev"
9+
repo-url: "https://github.com/AnswerDotAI/nbdev"

0 commit comments

Comments
 (0)