Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thebigmunch committed Mar 21, 2020
1 parent a8c625f commit e79c15a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Also, there are certain features not present in other solutions that would be pr
Features and functionality that set it apart:

* Uses the Python standard load(s)/dump(s) API.
* Can load filepaths, file-like objects and binary data (bytes-like objects).
* Can load filepaths, os.PathLike objects, file-like objects, and bytes-like objects.
* Metadata objects look like a dict **and** act like a dict.
* Some common libraries shadow the representation of a dict
and/or dict methods but do not behave like a dict.
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The goals of audio-metadata are to provide a nice API and good UX while keeping
Features and functionality that set it apart:

* Uses the Python standard load(s)/dump(s) API.
* Can load filepaths, file-like objects and binary data (bytes-like objects).
* Can load filepaths, os.PathLike objects, file-like objects, and bytes-like objects.
* Metadata objects look like a dict **and** act like a dict.
* Some common libraries shadow the representation of a dict
and/or dict methods but do not behave like a dict.
Expand Down
16 changes: 10 additions & 6 deletions src/audio_metadata/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def determine_format(data):
or file-like object of an audio file.
Returns:
Format: An audio format class if supported, else None.
Format: An appropriate audio format class if supported, else None.
"""

# Only convert if not already a DataReader.
Expand Down Expand Up @@ -90,11 +90,13 @@ def load(f):
A filepath, path-like object or file-like object of an audio file.
Returns:
Format: An audio format object.
Format: An audio format object of the appropriate type.
Raises:
UnsupportedFormat: If file is not of a supported format.
ValueError: If filepath/file-like object is not valid or readable.
FormatError: If the audio file is not valid.
UnsupportedFormat: If the audio file is not of a supported format.
ValueError: If ``f`` is not a valid str, path-like object,
file-like object, or is unreadable.
"""

if (
Expand Down Expand Up @@ -125,10 +127,12 @@ def loads(b):
b (bytes-like object): A bytes-like object of an audio file.
Returns:
Format: An audio format object.
Format: An audio format object of the appropriate type.
Raises:
UnsupportedFormat: If file is not of a supported format.
FormatError: If the audio file is not valid.
UnsupportedFormat: If the audio file is not of a supported format.
ValueError: If ``b`` is not a valid bytes-like object.
"""

try:
Expand Down

0 comments on commit e79c15a

Please sign in to comment.