Skip to content

Commit 1ea4a8d

Browse files
committed
chore: Remove unused parameters recursively
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.
1 parent 12eff70 commit 1ea4a8d

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

pystac/stac_io.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def json_loads(self, txt: str, *args: Any, **kwargs: Any) -> Dict[str, Any]:
101101
result = json.loads(txt)
102102
return result
103103

104-
def json_dumps(self, json_dict: Dict[str, Any], *args: Any, **kwargs: Any) -> str:
104+
def json_dumps(self, json_dict: Dict[str, Any]) -> str:
105105
"""Method used internally by :class:`StacIO` instances to serialize a dictionary
106106
to a JSON string.
107107
@@ -229,8 +229,6 @@ def save_json(
229229
self,
230230
dest: Union[str, "Link_Type"],
231231
json_dict: Dict[str, Any],
232-
*args: Any,
233-
**kwargs: Any,
234232
) -> None:
235233
"""Write a dict to the given URI as JSON.
236234
@@ -240,12 +238,8 @@ def save_json(
240238
Args:
241239
dest : The destination file to write the text to.
242240
json_dict : The JSON dict to write.
243-
*args : Additional positional arguments to be passed to
244-
:meth:`StacIO.json_dumps`.
245-
**kwargs : Additional keyword arguments to be passed to
246-
:meth:`StacIO.json_dumps`.
247241
"""
248-
txt = self.json_dumps(json_dict, *args, **kwargs)
242+
txt = self.json_dumps(json_dict)
249243
self.write_text(dest, txt)
250244

251245
@classmethod

0 commit comments

Comments
 (0)