Refactor pre_commit.repository and factor out cached-property

This commit is contained in:
Anthony Sottile 2018-12-30 18:11:28 -08:00
parent 7448e588ff
commit c577ed92e7
14 changed files with 390 additions and 446 deletions

View file

@ -10,6 +10,15 @@ from pre_commit import git
from pre_commit.clientlib import load_config
from pre_commit.clientlib import MANIFEST_HOOK_DICT
from pre_commit.commands.run import _filter_by_types
from pre_commit.meta_hooks.helpers import make_meta_entry
HOOK_DICT = {
'id': 'check-useless-excludes',
'name': 'Check for useless excludes',
'files': C.CONFIG_FILE,
'language': 'system',
'entry': make_meta_entry(__name__),
}
def exclude_matches_any(filenames, include, exclude):