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

Added option to manually specifiy project root #3116

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

janjachnik-dyson
Copy link

Description

This is one possible fix for: #3040

I have added the --project-root command line argument which can be used to force black to evaluate paths relative to that root. Otherwise, black will pick up things like .git folders in submodules and use the submodule path as the project root instead.

We want to auto-format our code in Visual Studio Code but want to exclude 3rd-party git submodules by specifying them in pyproject.toml. This is needed to make that work.

Checklist - did you ...

  • Add a CHANGELOG entry if necessary?
  • Add / update tests if necessary?
  • Add new / update outdated documentation?

@cooperlees cooperlees added C: configuration CLI and configuration C: file collection Related to file collection (e.g. gitignore & cache) or file discovery and all of its configuration. labels Jun 9, 2022
@github-actions
Copy link

github-actions bot commented Jun 9, 2022

diff-shades reports zero changes comparing this PR (181ea24) to main (f51e537).


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

This makes the behaviour of the tests better mimic real-world usage. Now
the git submodule full path test fails, reproducing the bug seen in
real-world usage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: configuration CLI and configuration C: file collection Related to file collection (e.g. gitignore & cache) or file discovery and all of its configuration.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants