File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 1818from .imports import *
1919from .foundation import *
2020from .basics import *
21-
21+ from importlib import import_module
2222from functools import wraps
2323import string ,time
2424from contextlib import contextmanager ,ExitStack
@@ -366,7 +366,7 @@ def get_source_link(func):
366366 mod = inspect .getmodule (func )
367367 module = mod .__name__ .replace ('.' , '/' ) + '.py'
368368 try :
369- nbdev_mod = importlib . import_module (mod .__package__ .split ('.' )[0 ] + '._nbdev' )
369+ nbdev_mod = import_module (mod .__package__ .split ('.' )[0 ] + '._nbdev' )
370370 return f"{ nbdev_mod .git_url } { module } #L{ line } "
371371 except : return f"{ module } #L{ line } "
372372
Original file line number Diff line number Diff line change 2929 " from fastcore.imports import *\n " ,
3030 " from fastcore.foundation import *\n " ,
3131 " from fastcore.basics import *\n " ,
32- " \n " ,
32+ " from importlib import import_module \n " ,
3333 " from functools import wraps\n " ,
3434 " import string,time\n " ,
3535 " from contextlib import contextmanager,ExitStack\n " ,
15921592 " mod = inspect.getmodule(func)\n " ,
15931593 " module = mod.__name__.replace('.', '/') + '.py'\n " ,
15941594 " try:\n " ,
1595- " nbdev_mod = importlib. import_module(mod.__package__.split('.')[0] + '._nbdev')\n " ,
1595+ " nbdev_mod = import_module(mod.__package__.split('.')[0] + '._nbdev')\n " ,
15961596 " return f\" {nbdev_mod.git_url}{module}#L{line}\"\n " ,
15971597 " except: return f\" {module}#L{line}\" "
15981598 ]
23872387 "display_name" : " Python 3 (ipykernel)" ,
23882388 "language" : " python" ,
23892389 "name" : " python3"
2390+ },
2391+ "language_info" : {
2392+ "codemirror_mode" : {
2393+ "name" : " ipython" ,
2394+ "version" : 3
2395+ },
2396+ "file_extension" : " .py" ,
2397+ "mimetype" : " text/x-python" ,
2398+ "name" : " python" ,
2399+ "nbconvert_exporter" : " python" ,
2400+ "pygments_lexer" : " ipython3" ,
2401+ "version" : " 3.9.7"
23902402 }
23912403 },
23922404 "nbformat" : 4 ,
You can’t perform that action at this time.
0 commit comments