Skip to content

Commit 2d3b164

Browse files
committed
fixes #1516
1 parent 50ea8fc commit 2d3b164

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Diff for: nbdev/maker.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ def _last_future(self:ModuleMaker, cells):
170170
except ValueError: return 0
171171

172172
# %% ../nbs/api/02_maker.ipynb
173-
def _import2relative(cells, lib_name=None):
174-
"Converts `cells` to use `import2relative` based on `lib_name`"
175-
if lib_name is None: lib_name = get_config().lib_name
176-
for cell in cells: cell.import2relative(lib_name)
173+
def _import2relative(cells, lib_path=None):
174+
"Converts `cells` to use `import2relative` based on `lib_path`"
175+
if lib_path is None: lib_path = get_config().lib_path
176+
for cell in cells: cell.import2relative(lib_path)
177177

178178
# %% ../nbs/api/02_maker.ipynb
179179
def _retr_mdoc(cells):

Diff for: nbdev/showdoc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,5 +251,5 @@ def colab_link(path):
251251
from IPython.display import Markdown
252252
cfg = get_config()
253253
pre = 'https://colab.research.google.com/github/'
254-
res = f'{pre}{cfg.user}/{cfg.lib_name}/blob/{cfg.branch}/{cfg.nbs_path.name}/{path}.ipynb'
254+
res = f'{pre}{cfg.user}/{cfg.repo}/blob/{cfg.branch}/{cfg.nbs_path.name}/{path}.ipynb'
255255
display(Markdown(f'[Open `{path}` in Colab]({res})'))

Diff for: nbs/api/02_maker.ipynb

+4-4
Original file line numberDiff line numberDiff line change
@@ -455,10 +455,10 @@
455455
"outputs": [],
456456
"source": [
457457
"#|export\n",
458-
"def _import2relative(cells, lib_name=None):\n",
459-
" \"Converts `cells` to use `import2relative` based on `lib_name`\"\n",
460-
" if lib_name is None: lib_name = get_config().lib_name\n",
461-
" for cell in cells: cell.import2relative(lib_name)"
458+
"def _import2relative(cells, lib_path=None):\n",
459+
" \"Converts `cells` to use `import2relative` based on `lib_path`\"\n",
460+
" if lib_path is None: lib_path = get_config().lib_path\n",
461+
" for cell in cells: cell.import2relative(lib_path)"
462462
]
463463
},
464464
{

Diff for: nbs/api/08_showdoc.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@
12911291
" from IPython.display import Markdown\n",
12921292
" cfg = get_config()\n",
12931293
" pre = 'https://colab.research.google.com/github/'\n",
1294-
" res = f'{pre}{cfg.user}/{cfg.lib_name}/blob/{cfg.branch}/{cfg.nbs_path.name}/{path}.ipynb'\n",
1294+
" res = f'{pre}{cfg.user}/{cfg.repo}/blob/{cfg.branch}/{cfg.nbs_path.name}/{path}.ipynb'\n",
12951295
" display(Markdown(f'[Open `{path}` in Colab]({res})'))"
12961296
]
12971297
},

0 commit comments

Comments
 (0)