Skip to content

remove last element of an Inline Table leaves a comma #259

Closed

Description

@gregT9

removing the last element of an Inline Table leaves a comma
this fail :

import tomlkit

to_parse='entry = {  version = "11.0", registry = "reg", path="/tmp/foo" }'
data = tomlkit.parse(to_parse)
data["entry"].remove("path")
assert data["entry"].as_string() == 'entry = {  version = "11.0", registry = "reg" }'

because data["entry"].as_string() is
{ version = "11.0", registry = "reg", }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions