Skip to content

Commit fbd2f80

Browse files
committed
plum fix
1 parent be3fd22 commit fbd2f80

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

nbdev/showdoc.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from importlib import import_module
1414
import inspect, sys
1515
from collections import OrderedDict
16-
from plum import Function
1716
from textwrap import fill
1817
from types import FunctionType
1918

@@ -189,7 +188,7 @@ def show_doc(sym, # Symbol to document
189188
elif isinstance(renderer,str):
190189
p,m = renderer.rsplit('.', 1)
191190
renderer = getattr(import_module(p), m)
192-
if isinstance(sym, Function): pass
191+
if isinstance_str(sym, "Function"): pass
193192
elif isinstance_str(sym, "TypeDispatch"): pass # use _str as TypeDispatch will be removed from fastcore
194193
else:return renderer(sym or show_doc, name=name, title_level=title_level)
195194

nbs/api/08_showdoc.ipynb

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"from importlib import import_module\n",
3939
"import inspect, sys\n",
4040
"from collections import OrderedDict\n",
41-
"from plum import Function\n",
4241
"from textwrap import fill\n",
4342
"from types import FunctionType"
4443
]
@@ -648,7 +647,7 @@
648647
" elif isinstance(renderer,str):\n",
649648
" p,m = renderer.rsplit('.', 1)\n",
650649
" renderer = getattr(import_module(p), m)\n",
651-
" if isinstance(sym, Function): pass\n",
650+
" if isinstance_str(sym, \"Function\"): pass\n",
652651
" elif isinstance_str(sym, \"TypeDispatch\"): pass # use _str as TypeDispatch will be removed from fastcore\n",
653652
" else:return renderer(sym or show_doc, name=name, title_level=title_level)"
654653
]

settings.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ language = English
1515
custom_sidebar = True
1616
license = apache2
1717
status = 5
18-
requirements = fastcore>=1.8.0 execnb>=0.1.12 astunparse ghapi>=1.0.3 watchdog asttokens setuptools plum-dispatch
18+
requirements = fastcore>=1.8.0 execnb>=0.1.12 astunparse ghapi>=1.0.3 watchdog asttokens setuptools
1919
pip_requirements = PyYAML
2020
conda_requirements = pyyaml
2121
conda_user = fastai
22-
dev_requirements = ipywidgets nbdev-numpy nbdev-stdlib pandas matplotlib black svg.py nbclassic pysymbol_llm llms-txt sphinx
22+
dev_requirements = ipywidgets nbdev-numpy nbdev-stdlib pandas matplotlib black svg.py nbclassic pysymbol_llm llms-txt sphinx plum-dispatch
2323
console_scripts = nbdev_create_config=nbdev.config:nbdev_create_config
2424
nbdev_update=nbdev.sync:nbdev_update
2525
nbdev_update_license=nbdev.cli:nbdev_update_license

0 commit comments

Comments
 (0)