From f02d9d0a38cd396b43f48cb4079dcba820d769b8 Mon Sep 17 00:00:00 2001 From: Prudvi <95167320+Prudvi-data@users.noreply.github.com> Date: Tue, 10 Jan 2023 18:07:37 +0530 Subject: [PATCH 1/2] Remove extra indent being added for sub tables --- tomlkit/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tomlkit/parser.py b/tomlkit/parser.py index c6393a57..eab5015c 100644 --- a/tomlkit/parser.py +++ b/tomlkit/parser.py @@ -960,7 +960,7 @@ def _parse_table( # So we have to create the parent tables table = Table( Container(True), - Trivia(indent, cws, comment, trail), + Trivia(indent*0, cws, comment, trail), is_aot and name_parts[0] in self._aot_stack, is_super_table=True, name=name_parts[0].key, From f2bf99e714eb8489d49faab3e1b02dd7b3fb860e Mon Sep 17 00:00:00 2001 From: Prudvi <95167320+Prudvi-data@users.noreply.github.com> Date: Wed, 8 Mar 2023 10:13:51 +0530 Subject: [PATCH 2/2] Fix linter issue --- tomlkit/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tomlkit/parser.py b/tomlkit/parser.py index 84e86121..48c22836 100644 --- a/tomlkit/parser.py +++ b/tomlkit/parser.py @@ -959,7 +959,7 @@ def _parse_table( # So we have to create the parent tables table = Table( Container(True), - Trivia(indent*0, cws, comment, trail), + Trivia(indent * 0, cws, comment, trail), is_aot and name_parts[0] in self._aot_stack, is_super_table=True, name=name_parts[0].key,