Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove unused parameters recursively #542

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pystac/stac_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def json_loads(self, txt: str, *args: Any, **kwargs: Any) -> Dict[str, Any]:
if orjson is not None:
result = orjson.loads(txt)
else:
result = json.loads(txt)
result = json.loads(txt, *args, **kwargs)
return result

def json_dumps(self, json_dict: Dict[str, Any], *args: Any, **kwargs: Any) -> str:
Expand All @@ -115,9 +115,11 @@ def json_dumps(self, json_dict: Dict[str, Any], *args: Any, **kwargs: Any) -> st
json_dict : The dictionary to serialize
"""
if orjson is not None:
return orjson.dumps(json_dict, option=orjson.OPT_INDENT_2).decode("utf-8")
return orjson.dumps(json_dict, option=orjson.OPT_INDENT_2, **kwargs).decode(
"utf-8"
)
else:
return json.dumps(json_dict, indent=2)
return json.dumps(json_dict, *args, indent=2, **kwargs)

def stac_object_from_dict(
self,
Expand Down