Skip to content

Assigning a dict over a dotted key renders a stale parent. prefix #524

@dimbleby

Description

@dimbleby

Similar flavour to #513, but this one introduces an unwanted header where that one only failed to reorder the document. Maybe they will turn out to have the same fix.

import tomlkit

doc = tomlkit.loads("fruit.apple = true\n")
doc["fruit"] = {"a": 1}

print(tomlkit.dumps(doc))

result

[fruit]
fruit.a = 1

which has too many fruit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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