diff options
| author | Anthony Sottile <asottile@umich.edu> | 2021-03-29 19:01:59 -0700 |
|---|---|---|
| committer | Anthony Sottile <asottile@umich.edu> | 2021-03-29 19:01:59 -0700 |
| commit | 1a1d850e99bb28625e47f4aa3c27014a3ac6758a (patch) | |
| tree | 8f8c96385848281021783ccba3821f4bf9a645f5 /src/flake8/exceptions.py | |
| parent | 434c108f7491b589362752b12979741598bb2dff (diff) | |
| download | flake8-1a1d850e99bb28625e47f4aa3c27014a3ac6758a.tar.gz | |
remove vcs integration
Diffstat (limited to 'src/flake8/exceptions.py')
| -rw-r--r-- | src/flake8/exceptions.py | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/flake8/exceptions.py b/src/flake8/exceptions.py index bef6f4b..ea9bc98 100644 --- a/src/flake8/exceptions.py +++ b/src/flake8/exceptions.py @@ -93,51 +93,3 @@ class PluginExecutionFailed(Flake8Exception): "name": self.plugin["plugin_name"], "exc": self.original_exception, } - - -class HookInstallationError(Flake8Exception): - """Parent exception for all hooks errors.""" - - -class GitHookAlreadyExists(HookInstallationError): - """Exception raised when the git pre-commit hook file already exists.""" - - def __init__(self, path): # type: (str) -> None - """Initialize the exception message from the `path`.""" - self.path = path - tmpl = ( - "The Git pre-commit hook ({0}) already exists. To convince " - "Flake8 to install the hook, please remove the existing " - "hook." - ) - super(GitHookAlreadyExists, self).__init__(tmpl.format(self.path)) - - -class MercurialHookAlreadyExists(HookInstallationError): - """Exception raised when a mercurial hook is already configured.""" - - hook_name = None # type: str - - def __init__(self, path, value): # type: (str, str) -> None - """Initialize the relevant attributes.""" - self.path = path - self.value = value - tmpl = ( - 'The Mercurial {0} hook already exists with "{1}" in {2}. ' - "To convince Flake8 to install the hook, please remove the " - "{0} configuration from the [hooks] section of your hgrc." - ) - msg = tmpl.format(self.hook_name, self.value, self.path) - super(MercurialHookAlreadyExists, self).__init__(msg) - - -class MercurialCommitHookAlreadyExists(MercurialHookAlreadyExists): - """Exception raised when the hg commit hook is already configured.""" - - hook_name = "commit" - - -class MercurialQRefreshHookAlreadyExists(MercurialHookAlreadyExists): - """Exception raised when the hg commit hook is already configured.""" - - hook_name = "qrefresh" |
