Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/BugSwarm/common
Browse files Browse the repository at this point in the history
  • Loading branch information
ndmeiri committed Jun 27, 2018
2 parents 1165446 + c46694c commit 2b45872
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bugswarm/common/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ def read_json(filepath: str):
Decode JSON data from a file.
:param filepath: Path to the file from which to read JSON data.
:raises ValueError:
:raises FileNotFoundError:
:raises FileNotFoundError: If no file exists at `filepath`.
:return: The decoded JSON object.
"""
if not filepath:
Expand All @@ -39,8 +38,7 @@ def write_json(filepath: str, data, overwrite: bool = True, encoder: Optional[js
file already exists at `filepath`, FileExistsError is raised. Defaults to True.
:param encoder: The encoder object to use for the JSON encoding. Should be a subclass of json.JSONEncoder.
DefaultJSONEncoder is used by default.
:raises ValueError:
:raises FileExistsError: When a file at `filepath` already exists and `overwrite` is False.
:raises FileExistsError: If a file at `filepath` already exists and `overwrite` is False.
:return: True if the write to `filepath` succeeded.
"""
if not filepath:
Expand Down

0 comments on commit 2b45872

Please sign in to comment.