Use a more intelligent default language version

This commit is contained in:
Anthony Sottile
2017-07-08 20:22:36 -07:00
parent 853cbecd4e
commit d876661345
15 changed files with 109 additions and 54 deletions

View File

@@ -10,16 +10,18 @@ from pre_commit.languages import script
from pre_commit.languages import swift
from pre_commit.languages import system
# A language implements the following constant and two functions in its module:
# A language implements the following constant and functions in its module:
#
# # Use None for no environment
# ENVIRONMENT_DIR = 'foo_env'
#
# def install_environment(
# repo_cmd_runner,
# version='default',
# additional_dependencies=(),
# ):
# def get_default_version():
# """Return a value to replace the 'default' value for language_version.
#
# return 'default' if there is no better option.
# """
#
# def install_environment(repo_cmd_runner, version, additional_dependencies):
# """Installs a repository in the given repository. Note that the current
# working directory will already be inside the repository.
#