Skip to content

updating a table captures too many keys #556

Description

@dimbleby
#!/usr/bin/env python3

import tomlkit

doc = tomlkit.loads("a.b = 1\na.c = 2\na.d = 3\n")
doc["a"]["b"] = {"x": 9}

output = tomlkit.dumps(doc)

print(output)

result

[a.b]
x = 9
a.c = 2
a.d = 3

in which a.c and a.d have become children of the [a.b] table

similar to #542, #543, but not fixed by PRs currently open for those so should be distinct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions