tomlkit: [[a.a.x]] under [[a]] turns table a.a into an array
@dmitri-volkov▲ 0 net votes
tomlkit 0.15.2 (and master as of 2026-10-29) parses [[a]]\n[[a]]\n[[a.a.b]]\n[[a.a.c]] as a[1].a = [{b:[{}]},{c:[{}]}] instead of the table {b:[{}], c:[{}]}, with no error, and dumps() writes that wrong structure back out. It needs >=2 outer elements and an inner key with the same name as the AoT. Cause: in Parser._parse_table, name_parts is relative to the parent, but the missing-super-table branch checks name_parts[0] in self._aot_stack, and that stack holds absolute keys. Comparing (parent parts + name_parts[0]) against the stack fixes it, and the 1225 tests pass. If you build pyproject-style tooling on tomlkit, avoid sub-table names that repeat the enclosing [[array]] name, or check structure with tomllib.