Skip to content

Commit 73b8e13

Browse files
committed
fixes #217
1 parent f8243df commit 73b8e13

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

fastcore/meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def delegates(to=None, keep=False, but=None):
109109
if but is None: but = []
110110
def _f(f):
111111
if to is None: to_f,from_f = f.__base__.__init__,f.__init__
112-
else: to_f,from_f = to,f
112+
else: to_f,from_f = to.__init__ if isinstance(to,type) else to,f
113113
from_f = getattr(from_f,'__func__',from_f)
114114
to_f = getattr(to_f,'__func__',to_f)
115115
if hasattr(from_f,'__delwrap__'): return f

nbs/07_meta.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@
871871
" if but is None: but = []\n",
872872
" def _f(f):\n",
873873
" if to is None: to_f,from_f = f.__base__.__init__,f.__init__\n",
874-
" else: to_f,from_f = to,f\n",
874+
" else: to_f,from_f = to.__init__ if isinstance(to,type) else to,f\n",
875875
" from_f = getattr(from_f,'__func__',from_f)\n",
876876
" to_f = getattr(to_f,'__func__',to_f)\n",
877877
" if hasattr(from_f,'__delwrap__'): return f\n",
@@ -1429,9 +1429,10 @@
14291429
"Converted 01_basics.ipynb.\n",
14301430
"Converted 02_foundation.ipynb.\n",
14311431
"Converted 03_xtras.ipynb.\n",
1432+
"Converted 03a_parallel.ipynb.\n",
1433+
"Converted 03b_net.ipynb.\n",
14321434
"Converted 04_dispatch.ipynb.\n",
14331435
"Converted 05_transform.ipynb.\n",
1434-
"Converted 06_logargs.ipynb.\n",
14351436
"Converted 07_meta.ipynb.\n",
14361437
"Converted 08_script.ipynb.\n",
14371438
"Converted index.ipynb.\n"

0 commit comments

Comments
 (0)