samuelcolvin / rtoml

Compare 8527d7b ... +0 ... 33a4b26

Coverage Reach
__init__.py

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 5 files from the diff.
Other files ignored by Codecov
src/lib.rs has changed.
rtoml/_rtoml.pyi has changed.
README.md has changed.

@@ -35,18 +35,27 @@
Loading
35 35
    return _rtoml.deserialize(toml, parse_datetime)
36 36
37 37
38 -
def dumps(obj: Any) -> str:
38 +
def dumps(obj: Any, *, pretty: bool = False) -> str:
39 39
    """
40 40
    Serialize a python object to TOML.
41 +
42 +
    If `pretty` is true, output has a more "pretty" format.
41 43
    """
42 -
    return _rtoml.serialize(obj)
44 +
    if pretty:
45 +
        serialize = _rtoml.serialize_pretty
46 +
    else:
47 +
        serialize = _rtoml.serialize
43 48
49 +
    return serialize(obj)
44 50
45 -
def dump(obj: Any, file: Union[Path, TextIO]) -> int:
51 +
52 +
def dump(obj: Any, file: Union[Path, TextIO], *, pretty: bool = False) -> int:
46 53
    """
47 54
    Serialize a python object to TOML and write it to a file. `file` may be a `Path` or file object from `open()`.
55 +
56 +
    If `pretty` is true, output has a more "pretty" format.
48 57
    """
49 -
    s = dumps(obj)
58 +
    s = dumps(obj, pretty=pretty)
50 59
    if isinstance(file, Path):
51 60
        return file.write_text(s)
52 61
    else:

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
rtoml/__init__.py 100.00%
Project Totals (1 files) 100.00%
Loading