Skip to content

Commit

Permalink
Release version 0.0.0.dev55
Browse files Browse the repository at this point in the history
  • Loading branch information
AAriam committed Dec 15, 2024
1 parent 55d7dec commit daac25d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ namespaces = true
# ----------------------------------------- Project Metadata -------------------------------------
#
[project]
version = "0.0.0.dev54"
version = "0.0.0.dev55"
name = "PySerials"
dependencies = [
"jsonschema >= 4.21.0, < 5",
"referencing >= 0.35.1",
"jsonpath-ng >= 1.6.1, < 2",
"ruamel.yaml >= 0.17.32, < 0.18", # https://yaml.readthedocs.io/en/stable/
"ruamel.yaml >= 0.18", # https://yaml.readthedocs.io/en/stable/
"ruamel.yaml.string >= 0.1.1, < 1",
"tomlkit >= 0.11.8, < 0.12", # https://tomlkit.readthedocs.io/en/stable/,
"MDit == 0.0.0.dev51",
"ExceptionMan == 0.0.0.dev51",
"MDit == 0.0.0.dev52",
"ExceptionMan == 0.0.0.dev52",
"ProtocolMan == 0.0.0.dev2",
]
requires-python = ">=3.10"
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
jsonschema >= 4.21.0, < 5
referencing >= 0.35.1
jsonpath-ng >= 1.6.1, < 2
ruamel.yaml >= 0.17.32, < 0.18
ruamel.yaml >= 0.18
ruamel.yaml.string >= 0.1.1, < 1
tomlkit >= 0.11.8, < 0.12
MDit == 0.0.0.dev51
ExceptionMan == 0.0.0.dev51
MDit == 0.0.0.dev52
ExceptionMan == 0.0.0.dev52
ProtocolMan == 0.0.0.dev2
9 changes: 7 additions & 2 deletions src/pyserials/write.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
from typing import Literal as _Literal
from __future__ import annotations as _annotations
from typing import Literal as _Literal, TYPE_CHECKING as _TYPE_CHECKING
from pathlib import Path as _Path
import json as _json
import ruamel.yaml as _yaml
from ruamel.yaml import scalarstring as _yaml_scalar_string
import tomlkit as _tomlkit

if _TYPE_CHECKING:
from typing import Callable, Any


def to_string(
data: dict | list | str | int | float | bool | _yaml.CommentedMap | _yaml.CommentedSeq,
Expand Down Expand Up @@ -47,8 +51,9 @@ def to_json_string(
data: dict | list | str | int | float | bool | _yaml.CommentedMap | _yaml.CommentedSeq,
sort_keys: bool = False,
indent: int | None = None,
default: Callable[[Any], Any] | None = None,
) -> str:
return _json.dumps(data, indent=indent, sort_keys=sort_keys)
return _json.dumps(data, indent=indent, sort_keys=sort_keys, default=default)


def to_yaml_file(
Expand Down

0 comments on commit daac25d

Please sign in to comment.