diff --git a/README.md b/README.md index dcb6321c4..6d9f01b68 100644 --- a/README.md +++ b/README.md @@ -290,18 +290,26 @@ for a `.pip-tools.toml` file and then in your `pyproject.toml`. You can also specify an alternate TOML configuration file with the `--config` option. For example, to by default generate `pip` hashes in the resulting -requirements file output, you can specify in a configuration file +requirements file output, you can specify in a configuration file: ```toml [tool.pip-tools] generate-hashes = true - ``` Options to `pip-compile` and `pip-sync` that may be used more than once must be defined as lists in a configuration file, even if they only have one value. +`pip-tools` supports default values vor [all valid command-line flags](/cli/index.md) +of its subcommands. Configuration keys may contain underscores instead of dashes, +so the above could also be specified in this format: + +```toml +[tool.pip-tools] +generate_hashes = true +``` + You might be wrapping the `pip-compile` command in another script. To avoid confusing consumers of your custom script you can override the update command generated at the top of requirements files by setting the diff --git a/piptools/utils.py b/piptools/utils.py index 68a46f51d..de2418473 100644 --- a/piptools/utils.py +++ b/piptools/utils.py @@ -58,6 +58,9 @@ "--no-config", } +# Set of option that are only negative, i.e. --no-