mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-26 15:28:28 +01:00
dvc: use black instead of flake8
Fixes #1546 Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
+22
-24
@@ -9,9 +9,10 @@ from dvc.command.config import CmdConfig
|
||||
|
||||
class CmdCacheDir(CmdConfig):
|
||||
def run(self):
|
||||
self.args.name = 'cache.dir'
|
||||
self.args.value = CmdRemoteAdd.resolve_path(self.args.value,
|
||||
self.configobj.filename)
|
||||
self.args.name = "cache.dir"
|
||||
self.args.value = CmdRemoteAdd.resolve_path(
|
||||
self.args.value, self.configobj.filename
|
||||
)
|
||||
|
||||
return super(CmdCacheDir, self).run()
|
||||
|
||||
@@ -19,39 +20,36 @@ class CmdCacheDir(CmdConfig):
|
||||
def add_parser(subparsers, parent_parser):
|
||||
from dvc.command.config import parent_config_parser
|
||||
|
||||
CACHE_HELP = 'Manage cache settings.'
|
||||
CACHE_HELP = "Manage cache settings."
|
||||
cache_parser = subparsers.add_parser(
|
||||
'cache',
|
||||
parents=[parent_parser],
|
||||
description=CACHE_HELP,
|
||||
help=CACHE_HELP)
|
||||
"cache", parents=[parent_parser], description=CACHE_HELP, help=CACHE_HELP
|
||||
)
|
||||
|
||||
cache_subparsers = cache_parser.add_subparsers(
|
||||
dest='cmd',
|
||||
help='Use dvc cache CMD --help for command-specific help.')
|
||||
dest="cmd", help="Use dvc cache CMD --help for command-specific help."
|
||||
)
|
||||
|
||||
fix_subparsers(cache_subparsers)
|
||||
|
||||
parent_cache_config_parser = argparse.ArgumentParser(
|
||||
add_help=False,
|
||||
parents=[parent_config_parser])
|
||||
CACHE_DIR_HELP = 'Configure cache directory location.'
|
||||
add_help=False, parents=[parent_config_parser]
|
||||
)
|
||||
CACHE_DIR_HELP = "Configure cache directory location."
|
||||
cache_dir_parser = cache_subparsers.add_parser(
|
||||
'dir',
|
||||
"dir",
|
||||
parents=[parent_cache_config_parser],
|
||||
description=CACHE_DIR_HELP,
|
||||
help=CACHE_DIR_HELP)
|
||||
help=CACHE_DIR_HELP,
|
||||
)
|
||||
cache_dir_parser.add_argument(
|
||||
'-u',
|
||||
'--unset',
|
||||
default=False,
|
||||
action='store_true',
|
||||
help='Unset option.')
|
||||
"-u", "--unset", default=False, action="store_true", help="Unset option."
|
||||
)
|
||||
cache_dir_parser.add_argument(
|
||||
'value',
|
||||
nargs='?',
|
||||
"value",
|
||||
nargs="?",
|
||||
default=None,
|
||||
help="Path to cache directory. Relative paths are resolved relative "
|
||||
"to the current directory and saved to config relative to the "
|
||||
"config file location.")
|
||||
"to the current directory and saved to config relative to the "
|
||||
"config file location.",
|
||||
)
|
||||
cache_dir_parser.set_defaults(func=CmdCacheDir)
|
||||
|
||||
Reference in New Issue
Block a user