Skip to content

Commit bcd2d64

Browse files
add check for TypeDispatch just in case
1 parent ad3b66a commit bcd2d64

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

nbdev/showdoc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ def show_doc(sym, # Symbol to document
190190
p,m = renderer.rsplit('.', 1)
191191
renderer = getattr(import_module(p), m)
192192
if isinstance(sym, Function): pass
193+
elif isinstance_str(sym, "TypeDispatch"): pass # use _str as TypeDispatch will be removed from fastcore
193194
else:return renderer(sym or show_doc, name=name, title_level=title_level)
194195

195196
# %% ../nbs/api/08_showdoc.ipynb

nbs/api/08_showdoc.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@
649649
" p,m = renderer.rsplit('.', 1)\n",
650650
" renderer = getattr(import_module(p), m)\n",
651651
" if isinstance(sym, Function): pass\n",
652+
" elif isinstance_str(sym, \"TypeDispatch\"): pass # use _str as TypeDispatch will be removed from fastcore\n",
652653
" else:return renderer(sym or show_doc, name=name, title_level=title_level)"
653654
]
654655
},

0 commit comments

Comments
 (0)