Skip to content

Conversation

@meliache
Copy link
Contributor

@meliache meliache commented Aug 2, 2024

Description

Extend the docstring of black's find_project_root to mention that it ignores pyproject.toml files without a [tool.black] section.

This is relevant because that function is also used by other python packages that use black. I found that e.g. datamodel-code-generator uses that function and that there the ignoring of the pyproject.toml files lead to a degradation. I think in that case it would be better to not use black's function for finding the pyproject.toml, but in any case this behavior should be documented.

Checklist - did you ...

  • Add new / update outdated documentation? -- point of this PR

@meliache meliache force-pushed the document-find-project-root-ignoring-pyproject-toml-without-black-section branch 2 times, most recently from 637b919 to b5bf52d Compare August 2, 2024 09:59
@github-actions
Copy link

github-actions bot commented Aug 2, 2024

diff-shades reports zero changes comparing this PR (c6b7a4c) to main (14b6e61).


What is this? | Workflow run | diff-shades documentation

@JelleZijlstra JelleZijlstra added the skip news Pull requests that don't need a changelog entry. label Aug 2, 2024
Extend the docstring of black's `find_project_root` to mention that it ignores
`pyproject.toml` files without a `[tool.black]` section.

This is relevant because that function is also used by other python packages
that use black. I found that e.g. datamodel-code-generator [1] uses that
function and that there the ignoring of the pyproject.toml files lead to
a degradation [2]. I think in that case it would be better to not use black's function
for finding the pyproject.toml, but in any case this behavior should be documented.

1: https://github.com/koxudaxi/datamodel-code-generator
2: koxudaxi/datamodel-code-generator#2052
@meliache meliache force-pushed the document-find-project-root-ignoring-pyproject-toml-without-black-section branch from b5bf52d to c6b7a4c Compare August 2, 2024 16:35
@JelleZijlstra JelleZijlstra merged commit 9ccf279 into psf:main Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news Pull requests that don't need a changelog entry.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants