Skip to content

Commit

Permalink
fixes #217
Browse files Browse the repository at this point in the history
  • Loading branch information
jph00 committed Dec 21, 2020
1 parent f8243df commit 73b8e13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fastcore/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def delegates(to=None, keep=False, but=None):
if but is None: but = []
def _f(f):
if to is None: to_f,from_f = f.__base__.__init__,f.__init__
else: to_f,from_f = to,f
else: to_f,from_f = to.__init__ if isinstance(to,type) else to,f
from_f = getattr(from_f,'__func__',from_f)
to_f = getattr(to_f,'__func__',to_f)
if hasattr(from_f,'__delwrap__'): return f
Expand Down
5 changes: 3 additions & 2 deletions nbs/07_meta.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@
" if but is None: but = []\n",
" def _f(f):\n",
" if to is None: to_f,from_f = f.__base__.__init__,f.__init__\n",
" else: to_f,from_f = to,f\n",
" else: to_f,from_f = to.__init__ if isinstance(to,type) else to,f\n",
" from_f = getattr(from_f,'__func__',from_f)\n",
" to_f = getattr(to_f,'__func__',to_f)\n",
" if hasattr(from_f,'__delwrap__'): return f\n",
Expand Down Expand Up @@ -1429,9 +1429,10 @@
"Converted 01_basics.ipynb.\n",
"Converted 02_foundation.ipynb.\n",
"Converted 03_xtras.ipynb.\n",
"Converted 03a_parallel.ipynb.\n",
"Converted 03b_net.ipynb.\n",
"Converted 04_dispatch.ipynb.\n",
"Converted 05_transform.ipynb.\n",
"Converted 06_logargs.ipynb.\n",
"Converted 07_meta.ipynb.\n",
"Converted 08_script.ipynb.\n",
"Converted index.ipynb.\n"
Expand Down

0 comments on commit 73b8e13

Please sign in to comment.