Skip to content

Commit

Permalink
chore: Remove unused parameters recursively
Browse files Browse the repository at this point in the history
Since `orjson.dumps` and `json.dumps` don't support the same options, we
probably don't want to forward arbitrary arguments to them in any case.
  • Loading branch information
l0b0 committed Jul 6, 2021
1 parent 97dc47d commit 7db87b7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions pystac/stac_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def json_loads(self, txt: str, *args: Any, **kwargs: Any) -> Dict[str, Any]:
result = json.loads(txt)
return result

def json_dumps(self, json_dict: Dict[str, Any], *args: Any, **kwargs: Any) -> str:
def json_dumps(self, json_dict: Dict[str, Any]) -> str:
"""Method used internally by :class:`StacIO` instances to serialize a dictionary
to a JSON string.
Expand Down Expand Up @@ -229,8 +229,6 @@ def save_json(
self,
dest: Union[str, "Link_Type"],
json_dict: Dict[str, Any],
*args: Any,
**kwargs: Any,
) -> None:
"""Write a dict to the given URI as JSON.
Expand All @@ -240,12 +238,8 @@ def save_json(
Args:
dest : The destination file to write the text to.
json_dict : The JSON dict to write.
*args : Additional positional arguments to be passed to
:meth:`StacIO.json_dumps`.
**kwargs : Additional keyword arguments to be passed to
:meth:`StacIO.json_dumps`.
"""
txt = self.json_dumps(json_dict, *args, **kwargs)
txt = self.json_dumps(json_dict)
self.write_text(dest, txt)

@classmethod
Expand Down

0 comments on commit 7db87b7

Please sign in to comment.