Skip to content

Commit

Permalink
pass want_json when called recursively
Browse files Browse the repository at this point in the history
  • Loading branch information
kylewm committed Sep 14, 2015
1 parent f1ecc06 commit eaf34e8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,13 @@ request, or just message me in the \#indiewebcamp channel on freenode.
Changes
-------

All notable changes to this project will be documented in this file.
All notable changes to this project will be documented here.

### 0.2.5 - 2015-09-14
#### Changed

- minor bugfix: interpret should pass want_json recursively when
fetching reply contexts.

### 0.2.4 - 2015-09-14

Expand Down
6 changes: 3 additions & 3 deletions mf2util/interpret.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def interpret_entry(parsed, source_url, hentry=None, want_json=False):
for url_val in hentry['properties'].get(prop, []):
if isinstance(url_val, dict):
result.setdefault(prop, []).append(
interpret_entry(parsed, source_url, url_val))
interpret_entry(parsed, source_url, url_val, want_json))
else:
result.setdefault(prop, []).append({
'url': url_val,
Expand Down Expand Up @@ -225,7 +225,7 @@ def interpret(parsed, source_url, item=None, want_json=False):
discovery)
:param dict item: (optional) the item to be parsed. If provided,
this will be used instead of the first element on the page.
:param boolean want_json (optional, default False) If true, the result
:param boolean want_json: (optional, default False) If true, the result
will be pure json with datetimes as strings instead of python objects
:return: a dict as described by interpret_entry or interpret_event, or None
"""
Expand Down Expand Up @@ -257,7 +257,7 @@ def interpret_comment(parsed, source_url, target_urls, want_json=False):
:param list target_urls: a collection containing the URL of the target\
document, and any alternate URLs (e.g., shortened links) that should\
be considered equivalent when looking for references
:param boolean want_json (optional, default False) If true, the result
:param boolean want_json: (optional, default False) If true, the result
will be pure json with datetimes as strings instead of python objects
:return: a dict as described above, or None
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def run_tests(self):


setup(name='mf2util',
version='0.2.4',
version='0.2.5',
description='Python Microformats2 utilities, a companion to mf2py',
long_description="""
Microformats2 Utilities
Expand Down

0 comments on commit eaf34e8

Please sign in to comment.