-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore pyproject.toml missing tool.black section (#4204)
Fixes #2863 This is pretty desirable in a monorepo situation where you have configuration in the root since it will mean you don't have to reconfigure every project. The good news for backward compatibility is that `find_project_root` continues to stop at any git or hg root, so in all cases repo root coincides with a pyproject.toml missing tool.black, we'll continue to have the project root as before and end up using default config (i.e. we're unlikely to randomly start using the user config). The other thing we need to be a little careful about is that changing find_project_root logic affects what `exclude` is relative to. Since we only change in cases where there is no config, this only applies where users were using `exclude` via command line arg (and had pyproject.toml missing tool.black in a dir that was not repo root). Finally, for the few who could be affected, the fix is to put an empty `[tool.black]` in pyproject.toml
- Loading branch information
1 parent
24c9c01
commit 2623269
Showing
4 changed files
with
37 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters