Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unnecessary newline addition on sub-tables #70

Merged
merged 4 commits into from
Feb 27, 2023

Conversation

adamchainz
Copy link
Contributor

Fixes #69.

@gaborbernat
Copy link
Member

Can you add a test that for this new case if there's no newline we add it?

@adamchainz
Copy link
Contributor Author

Try that!

content = """
[tool.mypy]
a = 0

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this newline too here 😅

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see why you did not do it. 🤔 If you remove this line this patch will not add the newline in.

@adamchainz
Copy link
Contributor Author

I've pushed an ignore for the coverage issue ( nedbat/coveragepy#1480 ). We could make pyproject-fmt format all space between tables and sub-tables, but perahps first release this to fix the bug?

@gaborbernat gaborbernat merged commit 80d5c11 into tox-dev:main Feb 27, 2023
@adamchainz adamchainz deleted the issue_69 branch February 28, 2023 08:40
@MindTooth
Copy link
Contributor

thank you

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.

Every run of pre-commit adds a newline after [tool.mypy]
3 participants