Skip to content
This repository has been archived by the owner on May 31, 2019. It is now read-only.

Commit

Permalink
Fix docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
c-bata committed Dec 29, 2016
1 parent 0d0002c commit 6c48d71
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kobin/environs.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ def _split_into_mimetype_and_priority(x):
"""Split an accept header item into mimetype and priority.
>>> _split_into_mimetype_and_priority('text/*')
('text/*', 1)
('text/*', 1.0)
>>> _split_into_mimetype_and_priority('application/json;q=0.5')
('application/json', 0.5)
"""
Expand All @@ -186,7 +187,7 @@ def _split_into_mimetype_and_priority(x):
def _parse_and_sort_accept_header(accept_header):
"""Parse and sort the accept header items.
>>> _split_into_mimetype_and_priority('application/json;q=0.5, text/*')
>>> _parse_and_sort_accept_header('application/json;q=0.5, text/*')
[('text/*', 1.0), ('application/json', 0.5)]
"""
return sorted([_split_into_mimetype_and_priority(x) for x in accept_header.split(',')],
Expand Down

0 comments on commit 6c48d71

Please sign in to comment.