Hi,
I noticed tomlkit accepts appending a Table within an InlineTable, which isn't allowed in the toml format.
The following code does that:
import tomlkit
t = tomlkit.table()
t.append("a", 1)
it = tomlkit.inline_table()
it.append("table", t)
d = tomlkit.document()
d.append("inline_table", it)
with open("output.toml", "w") as f:
tomlkit.dump(d, f)
which results in the following invalid toml file:
inline_table = {table = a = 1
}
Maybe tomlkit should raise an error when this happen, instead of writing invalid toml ?
Hi,
I noticed
tomlkitaccepts appending aTablewithin anInlineTable, which isn't allowed in the toml format.The following code does that:
which results in the following invalid toml file:
Maybe
tomlkitshould raise an error when this happen, instead of writing invalid toml ?