-
Notifications
You must be signed in to change notification settings - Fork 56
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
Darker did rely on --config
but now only uses black find_project_root
for it's own config, breaking mono-repository usage
#244
Comments
Hi @DavidCDreher, Thanks for notifying about this unfortunate regression, and for a detailed description. I'll get back to this very soon. Did you make any attempt to modify Darker to restore the old behavior? |
Hi @akaihola since we mainly use |
Hi @DavidCDreher, Would it be a better behavior if Darker ignored I do regret that the |
#351 would actually make it possible to simply do |
Sorry I just realized there was a question along your comments:
I think first and foremost there should be way to supply the directory where to find the config and that should be always respected by the tool. I can understand |
Thanks @DavidCDreher for your reply! Combining my and your comments, I think we haven't yet precisely defined how Darker should work (eventually, and possibly in interim versions during deprecation). Would the following be a fair approach in your opinion? Version 1.5.0
Version 1.6.0
Version 2.0.0
|
We have a mono-repo layout something like this
The root
pyproject.toml
contains the[tool.darker]
and[tool.black]
configuration for the whole project.The individual apps/libs pyproject.toml files contain build and other settings.
You used to have the
load_config
for darker respect the--config
argument:darker/src/darker/config.py
Line 22 in dce884b
But unfortunately you removed this:
darker/src/darker/config.py
Line 100 in 4f2e943
Now if we have changed for example
lib/some_lib/setup.py
then the sources that get passed aresrc = [ "lib/some_lib/setup.py" ]
which get passed to black'sfind_project_root
which will find thepyproject.toml
file inlib/some_lib/pyproject.toml
and you will load that, which has no settings fordarker
. It would be good to revert this or at least allow the option to configure the path to thedarker
config file as well.The text was updated successfully, but these errors were encountered: