Skip to content

Commit

Permalink
fixes #236
Browse files Browse the repository at this point in the history
  • Loading branch information
jph00 committed Dec 1, 2020
1 parent 00534f3 commit 17eb005
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fastcore/xtras.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ def join_path_file(file, path, ext=''):
return path/f'{file}{ext}'

# Cell
def loads(s, encoding=None, cls=None, object_hook=None, parse_float=None,
def loads(s, cls=None, object_hook=None, parse_float=None,
parse_int=None, parse_constant=None, object_pairs_hook=None, **kw):
"Same as `json.loads`, but handles `None`"
if not s: return {}
return json.loads(s, encoding=encoding, cls=cls, object_hook=object_hook, parse_float=parse_float,
return json.loads(s, cls=cls, object_hook=object_hook, parse_float=parse_float,
parse_int=parse_int, parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)

# Cell
Expand Down
4 changes: 2 additions & 2 deletions nbs/03_xtras.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1149,11 +1149,11 @@
"outputs": [],
"source": [
"#export\n",
"def loads(s, encoding=None, cls=None, object_hook=None, parse_float=None,\n",
"def loads(s, cls=None, object_hook=None, parse_float=None,\n",
" parse_int=None, parse_constant=None, object_pairs_hook=None, **kw):\n",
" \"Same as `json.loads`, but handles `None`\"\n",
" if not s: return {}\n",
" return json.loads(s, encoding=encoding, cls=cls, object_hook=object_hook, parse_float=parse_float,\n",
" return json.loads(s, cls=cls, object_hook=object_hook, parse_float=parse_float,\n",
" parse_int=parse_int, parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)"
]
},
Expand Down

0 comments on commit 17eb005

Please # to comment.