Files
dvc/dvc/command/install.py
T
Ruslan Kuprieiev 4896f08ddf dvc: comply with both flake8 and black
flake8 provides some additional features like unused vars check, etc, so
it makes total sense to use it as well.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-02-04 00:10:36 +02:00

26 lines
643 B
Python

from __future__ import unicode_literals
import dvc.logger as logger
from dvc.command.base import CmdBase
class CmdInstall(CmdBase):
def run_cmd(self):
try:
self.project.install()
except Exception:
logger.error("failed to install dvc hooks")
return 1
return 0
def add_parser(subparsers, parent_parser):
INSTALL_HELP = "Install dvc hooks into the repository."
install_parser = subparsers.add_parser(
"install",
parents=[parent_parser],
description=INSTALL_HELP,
help=INSTALL_HELP,
)
install_parser.set_defaults(func=CmdInstall)