Skip to content

Commit 5a2fdc9

Browse files
authored
Add missing return type annotation to json_extension.dump() (#195)
The `dump()` function wrapper was missing a return type annotation, causing type checking ambiguity. ## Changes - Added `-> None` return type annotation to `dump()` in `gridappsd/json_extension.py` The function wraps `json.dump()`, which writes to a file object and returns `None`. The annotation now matches the standard library's signature. ```python def dump( data: Any, fo: TextIO, *, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, indent=None, separators=None, default=None, sort_keys=False, **kw, ) -> None: # Added _json.dump(...) ``` <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
2 parents 1689c18 + 9c34960 commit 5a2fdc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gridappsd-python-lib/gridappsd/json_extension.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def dump(
4646
default=None,
4747
sort_keys=False,
4848
**kw,
49-
):
49+
) -> None:
5050
_json.dump(
5151
data,
5252
fo,

0 commit comments

Comments
 (0)