File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -523,13 +523,13 @@ def open( # type: ignore # noqa A003
523
523
else :
524
524
newline = "\n "
525
525
526
- return super ().open ( # type: ignore
527
- mode ,
528
- buffering = buffering ,
529
- encoding = encoding ,
530
- errors = errors ,
531
- newline = newline ,
532
- )
526
+ return super ().open ( # type: ignore # yapf: disable
527
+ mode ,
528
+ buffering = buffering ,
529
+ encoding = encoding ,
530
+ errors = errors ,
531
+ newline = newline ,
532
+ )
533
533
534
534
def dump_json (
535
535
self ,
@@ -538,7 +538,7 @@ def dump_json(
538
538
errors : Optional [str ] = None ,
539
539
json_library : JsonLibrary = json , # type: ignore
540
540
** kwargs ,
541
- ) -> int :
541
+ ) -> None :
542
542
"""
543
543
Dump ``data`` to the file as JSON.
544
544
@@ -550,9 +550,15 @@ def dump_json(
550
550
:param kwargs: Keyword arguments to pass to the JSON serialisation function.
551
551
552
552
.. versionadded:: 0.5.0
553
+
554
+ .. versionchanged:: 1.0.0
555
+
556
+ Now uses :meth:`PathPlus.write_clean <domdf_python_tools.paths.PathPlus.write_clean>`
557
+ rather than :meth:`PathPlus.write_text <domdf_python_tools.paths.PathPlus.write_text>`,
558
+ and returns :py:obj:`None` rather than :class:`int`.
553
559
"""
554
560
555
- return self .write_text (
561
+ return self .write_clean (
556
562
json_library .dumps (data , ** kwargs ),
557
563
encoding = encoding ,
558
564
errors = errors ,
You can’t perform that action at this time.
0 commit comments