mirror of https://github.com/pypa/pip
fix linting errors
This commit is contained in:
parent
b818b8324d
commit
c6bf7acc97
|
@ -403,12 +403,14 @@ def handle_cli_no_binary(option, opt_str, value, parser):
|
|||
value, existing.no_binary, existing.only_binary,
|
||||
)
|
||||
|
||||
|
||||
def handle_cli_only_binary(option, opt_str, value, parser):
|
||||
existing = getattr(parser.values, option.dest)
|
||||
FormatControl.handle_mutual_excludes(
|
||||
value, existing.only_binary, existing.no_binary,
|
||||
)
|
||||
|
||||
|
||||
def no_binary():
|
||||
format_control = FormatControl(set(), set())
|
||||
return Option(
|
||||
|
|
|
@ -5,8 +5,6 @@ import os
|
|||
|
||||
from pip._internal.cli import cmdoptions
|
||||
from pip._internal.cli.base_command import RequirementCommand
|
||||
from pip._internal.exceptions import CommandError
|
||||
from pip._internal.format_control import FormatControl
|
||||
from pip._internal.operations.prepare import RequirementPreparer
|
||||
from pip._internal.req import RequirementSet
|
||||
from pip._internal.req.req_tracker import RequirementTracker
|
||||
|
|
|
@ -57,6 +57,7 @@ def test_comma_separated_values():
|
|||
assert cmd.options.format_control.only_binary == expected.only_binary
|
||||
assert cmd.options.format_control.no_binary == expected.no_binary
|
||||
|
||||
|
||||
def test_fmt_ctl_matches():
|
||||
fmt = FormatControl(set(), set())
|
||||
assert fmt.get_allowed_formats("fred") == frozenset(["source", "binary"])
|
||||
|
|
Loading…
Reference in New Issue