Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and chrysle committed Nov 26, 2023
1 parent b497454 commit 5e8fbee
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions piptools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,12 @@ def _invert_negative_bool_options_in_config(
long_option = _convert_to_long_option(key)
new_key = cli_opts[long_option].name if long_option in cli_opts else key
negative_option_prefix = "no_"
if new_key.startswith(negative_option_prefix):
new_key = new_key[len(negative_option_prefix):]
assert new_key is not None
if (
new_key.startswith(negative_option_prefix)
and long_option not in ONLY_NEGATIVE_OPTIONS
):
new_key = new_key[len(negative_option_prefix) :]

# Invert negative boolean according to the CLI
new_value = (
Expand Down

0 comments on commit 5e8fbee

Please sign in to comment.