-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
annotation --config is added even there is no configuration #1902
Comments
|
Perhaps, |
oh maybe in def override_defaults_from_config_file(
ctx: click.Context, param: click.Parameter, value: str | None
) -> Path | None:
if ctx.params.get("no_config"):
return None
if value is None:
config_file = select_config_file(ctx.params.get("src_files", ()))
if config_file is None:
return None
else:
config_file = Path(value)
config = parse_config_file(config_file)
if not config:
return None
_assign_config_to_cli_context(ctx, config)
return config_file It seems this is an another bug |
Arguably empty config is still a config. |
But why does not it found configuration in this case:
pyproject.toml is not empty |
@q0w I'm not following. Could you please elaborate? |
When src_files is ('requirements/test.in',) it does not find a config file from pyproject.toml. Use an example from this issue and add a pip-tools configuration in pyproject.toml to reproduce. |
|
Which is why |
Yes, but I think it should find pyproject.toml because pip-tools is called in PWD=., not requirements dir |
@q0w agreed 👍🏻 select_config_file should search for configs in PWD and in src_files dirs. Currently, it searches in PWD or src_files dirs. |
pip-tools 6.14.0 adds --config annotation even there is no configuration.
Environment Versions
$ python -V
: 3.11.3$ pip --version
: 22.3.1$ pip-compile --version
: 6.14.0Steps to replicate
Expected result
Actual result
The text was updated successfully, but these errors were encountered: