You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tomlkit inserts an invalid comma when appending to unusually formatted array #494
Bit of an edge case: but I found it so I might as well tell you about it.
importtomlkitsrc=""" a = [ 1 # comma is on the next line ,2 ]"""doc=tomlkit.parse(src)
assertdoc== {"a": [1, 2]}, "src is valid TOML"doc["a"].append(99)
out=tomlkit.dumps(doc)
print(out)
output:
a = [
1 # comma is on the next line
,2,
,99
]
which has too many commas between the 2 and the 99.
Activity