jazzband / pip-tools

A set of tools to keep your pinned Python dependencies fresh.
https://pip-tools.rtfd.io
BSD 3-Clause "New" or "Revised" License
7.6k stars 607 forks source link

pip-compile should not generate a command with --output-file if the output file matches the configuration #2094

Open aentwist opened 2 months ago

aentwist commented 2 months ago

Expected

pyproject.toml

[tool.pip-tools]
src_files = ["requirements.in", "dev-requirements.in"]
output_file = "requirements-lock.txt"

output command is pip-compile

Actual

#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
#    pip-compile --output-file=requirements-lock.txt
#

very low prio

chrysle commented 2 months ago

Hmm, why do you think it shouldn't? If it is configured, it is something specified by the user (although indirectly).

aentwist commented 2 months ago

Well with the configuration in place it would mislead people as to the minimum of what they have to do. I can appreciate the thing being as if there is no configuration in place. In that case, src_files should also be represented. Because of the inconsistency between src_files and output_file in the output command I think it just struck me as a bit off.