Skip to content

fix: keep newline after dotted inline table#533

Open
gaoflow wants to merge 1 commit into
python-poetry:masterfrom
gaoflow:fix-440-newline-after-inline-table
Open

fix: keep newline after dotted inline table#533
gaoflow wants to merge 1 commit into
python-poetry:masterfrom
gaoflow:fix-440-newline-after-inline-table

Conversation

@gaoflow

@gaoflow gaoflow commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve the trailing newline from a parsed dotted-key super table when appending a following sibling key
  • add regression coverage for adding a key after [x]\na.b = {} with and without a final newline

Closes #440.

Tests

  • uv run --no-project --with pytest --with pyyaml python -m pytest tests/test_toml_document.py::test_add_key_after_dotted_inline_table_without_ending_newline -q
  • uv run --no-project --with pytest --with pyyaml python -m pytest tests/test_toml_document.py -q
  • uv run --no-project --with pytest --with pyyaml python -m pytest -q (1024 passed)
  • uv run --no-project --with ruff ruff check tomlkit/container.py tests/test_toml_document.py
  • uv run --no-project --with ruff ruff format --check tomlkit/container.py tests/test_toml_document.py
  • git diff --check

AI assistance was used under my direction.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing newline after inline table

1 participant