File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff 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
179179def _retr_mdoc (cells ):
Original file line number Diff line number Diff 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 } )' ))
Original file line number Diff line number Diff line change 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 {
Original file line number Diff line number Diff line change 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 },
You can’t perform that action at this time.
0 commit comments