mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Make all Option callbacks start with the same prefix.
This commit is contained in:
parent
929fefdbae
commit
fada348b00
|
@ -543,7 +543,8 @@ cache_dir = partial(
|
||||||
) # type: Callable[..., Option]
|
) # type: Callable[..., Option]
|
||||||
|
|
||||||
|
|
||||||
def no_cache_dir_callback(option, opt, value, parser):
|
def _handle_no_cache_dir(option, opt, value, parser):
|
||||||
|
# type: (Option, str, str, OptionParser) -> None
|
||||||
"""
|
"""
|
||||||
Process a value provided for the --no-cache-dir option.
|
Process a value provided for the --no-cache-dir option.
|
||||||
|
|
||||||
|
@ -575,7 +576,7 @@ no_cache = partial(
|
||||||
"--no-cache-dir",
|
"--no-cache-dir",
|
||||||
dest="cache_dir",
|
dest="cache_dir",
|
||||||
action="callback",
|
action="callback",
|
||||||
callback=no_cache_dir_callback,
|
callback=_handle_no_cache_dir,
|
||||||
help="Disable the cache.",
|
help="Disable the cache.",
|
||||||
) # type: Callable[..., Option]
|
) # type: Callable[..., Option]
|
||||||
|
|
||||||
|
@ -620,7 +621,8 @@ no_build_isolation = partial(
|
||||||
) # type: Callable[..., Option]
|
) # type: Callable[..., Option]
|
||||||
|
|
||||||
|
|
||||||
def no_use_pep517_callback(option, opt, value, parser):
|
def _handle_no_use_pep517(option, opt, value, parser):
|
||||||
|
# type: (Option, str, str, OptionParser) -> None
|
||||||
"""
|
"""
|
||||||
Process a value provided for the --no-use-pep517 option.
|
Process a value provided for the --no-use-pep517 option.
|
||||||
|
|
||||||
|
@ -658,7 +660,7 @@ no_use_pep517 = partial(
|
||||||
'--no-use-pep517',
|
'--no-use-pep517',
|
||||||
dest='use_pep517',
|
dest='use_pep517',
|
||||||
action='callback',
|
action='callback',
|
||||||
callback=no_use_pep517_callback,
|
callback=_handle_no_use_pep517,
|
||||||
default=None,
|
default=None,
|
||||||
help=SUPPRESS_HELP
|
help=SUPPRESS_HELP
|
||||||
) # type: Any
|
) # type: Any
|
||||||
|
@ -724,7 +726,7 @@ always_unzip = partial(
|
||||||
) # type: Callable[..., Option]
|
) # type: Callable[..., Option]
|
||||||
|
|
||||||
|
|
||||||
def _merge_hash(option, opt_str, value, parser):
|
def _handle_merge_hash(option, opt_str, value, parser):
|
||||||
# type: (Option, str, str, OptionParser) -> None
|
# type: (Option, str, str, OptionParser) -> None
|
||||||
"""Given a value spelled "algo:digest", append the digest to a list
|
"""Given a value spelled "algo:digest", append the digest to a list
|
||||||
pointed to in a dict by the algo name."""
|
pointed to in a dict by the algo name."""
|
||||||
|
@ -749,7 +751,7 @@ hash = partial(
|
||||||
# __dict__ copying in process_line().
|
# __dict__ copying in process_line().
|
||||||
dest='hashes',
|
dest='hashes',
|
||||||
action='callback',
|
action='callback',
|
||||||
callback=_merge_hash,
|
callback=_handle_merge_hash,
|
||||||
type='string',
|
type='string',
|
||||||
help="Verify that the package's archive matches this "
|
help="Verify that the package's archive matches this "
|
||||||
'hash before installing. Example: --hash=sha256:abcdef...',
|
'hash before installing. Example: --hash=sha256:abcdef...',
|
||||||
|
|
Loading…
Reference in a new issue