diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3e5dc5f5..1bffc6a9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ - repo: git@github.com:pre-commit/pre-commit-hooks - sha: 8aa14d218d0fe5a2c486498269b3e37d3ba5aad2 + sha: bec87f6c87284ea15dbcf7801810404c8036bab4 hooks: - id: pyflakes files: \.py$ @@ -12,9 +12,9 @@ - id: end-of-file-fixer files: \.(py|sh|yaml)$ - repo: git@github.com:pre-commit/pre-commit - sha: c695ee9a9a78ac73439c52e0085bafec8037bc2d + sha: c62c1a3b513ab9e057e85a5e950bd7c438371076 hooks: - id: validate_manifest - files: ^manifest.yaml$ + files: ^hooks.yaml$ - id: validate_config files: ^\.pre-commit-config.yaml$ diff --git a/example_manifest.yaml b/example_hooks.yaml similarity index 100% rename from example_manifest.yaml rename to example_hooks.yaml diff --git a/manifest.yaml b/hooks.yaml similarity index 100% rename from manifest.yaml rename to hooks.yaml diff --git a/pre_commit/constants.py b/pre_commit/constants.py index c5a81eb5..666664f0 100644 --- a/pre_commit/constants.py +++ b/pre_commit/constants.py @@ -3,7 +3,7 @@ CONFIG_FILE = '.pre-commit-config.yaml' HOOKS_WORKSPACE = '.pre-commit-files' -MANIFEST_FILE = 'manifest.yaml' +MANIFEST_FILE = 'hooks.yaml' SUPPORTED_LANGUAGES = set([ 'python', diff --git a/testing/resources/consumer_repo/.pre-commit-config.yaml b/testing/resources/consumer_repo/.pre-commit-config.yaml index da23b5c3..1bffc6a9 100644 --- a/testing/resources/consumer_repo/.pre-commit-config.yaml +++ b/testing/resources/consumer_repo/.pre-commit-config.yaml @@ -1,22 +1,20 @@ - - repo: git@github.com:pre-commit/pre-commit-hooks - sha: 76739902911688e8d7b13241409f9facc0e534e4 + sha: bec87f6c87284ea15dbcf7801810404c8036bab4 hooks: - - id: pyflakes - files: '\.py$' - - id: debug-statements - files: '\.py$' - - id: trailing-whitespace - files: '\.(py|sh|yaml)$' - - id: name-tests-test - files: 'tests/.+\.py$' - - id: end-of-file-fixer - files: '\.(py|sh|yaml)$' - + - id: pyflakes + files: \.py$ + - id: debug-statements + files: \.py$ + - id: trailing-whitespace + files: \.(py|sh|yaml)$ + - id: name-tests-test + files: tests/.+\.py$ + - id: end-of-file-fixer + files: \.(py|sh|yaml)$ - repo: git@github.com:pre-commit/pre-commit - sha: 47b7ca44ed1fcaa83464ed00cef72049ae22c33d + sha: c62c1a3b513ab9e057e85a5e950bd7c438371076 hooks: - - id: validate_manifest - files: '^manifest.yaml$' - - id: validate_config - files: \.pre-commit-config.yaml + - id: validate_manifest + files: ^hooks.yaml$ + - id: validate_config + files: ^\.pre-commit-config.yaml$ diff --git a/testing/resources/node_hooks_repo/manifest.yaml b/testing/resources/node_hooks_repo/hooks.yaml similarity index 100% rename from testing/resources/node_hooks_repo/manifest.yaml rename to testing/resources/node_hooks_repo/hooks.yaml diff --git a/testing/resources/python_hooks_repo/manifest.yaml b/testing/resources/python_hooks_repo/hooks.yaml similarity index 100% rename from testing/resources/python_hooks_repo/manifest.yaml rename to testing/resources/python_hooks_repo/hooks.yaml diff --git a/tests/clientlib/validate_base_test.py b/tests/clientlib/validate_base_test.py index 4d8851a9..2a74ba88 100644 --- a/tests/clientlib/validate_base_test.py +++ b/tests/clientlib/validate_base_test.py @@ -17,7 +17,7 @@ class AdditionalValidatorError(ValueError): pass @pytest.fixture def noop_validator(): - return get_validator('example_manifest.yaml', {}, ValueError) + return get_validator('example_hooks.yaml', {}, ValueError) @pytest.fixture @@ -31,7 +31,7 @@ def additional_validator(): raise AdditionalValidatorError return get_validator( - 'example_manifest.yaml', + 'example_hooks.yaml', {}, ValueError, additional_validation_strategy=raises_always, @@ -52,7 +52,7 @@ def test_defaults_to_backup_filename(noop_validator): with mock.patch.object(__builtin__, 'open', side_effect=open) as mock_open: noop_validator() mock_open.assert_called_once_with( - os.path.join(git.get_root(), 'example_manifest.yaml'), 'r', + os.path.join(git.get_root(), 'example_hooks.yaml'), 'r', ) diff --git a/tests/clientlib/validate_manifest_test.py b/tests/clientlib/validate_manifest_test.py index 0246dfba..f6aed26a 100644 --- a/tests/clientlib/validate_manifest_test.py +++ b/tests/clientlib/validate_manifest_test.py @@ -10,7 +10,7 @@ from pre_commit.clientlib.validate_manifest import run def test_returns_0_for_valid_manifest(): - assert run(['example_manifest.yaml']) == 0 + assert run(['example_hooks.yaml']) == 0 def test_returns_0_for_our_manifest(): diff --git a/tests/git_test.py b/tests/git_test.py index 5ce2a7f0..17d60311 100644 --- a/tests/git_test.py +++ b/tests/git_test.py @@ -22,7 +22,7 @@ def get_files_matching_func(): 'pre_commit/run.py', 'pre_commit/git.py', 'im_a_file_that_doesnt_exist.py', - 'manifest.yaml', + 'hooks.yaml', ) return git.get_files_matching(get_filenames) @@ -33,7 +33,7 @@ def test_get_files_matching_base(get_files_matching_func): assert ret == set([ 'pre_commit/run.py', 'pre_commit/git.py', - 'manifest.yaml', + 'hooks.yaml', ]) @@ -47,7 +47,7 @@ def test_get_files_matching_total_match(get_files_matching_func): def test_does_search_instead_of_match(get_files_matching_func): ret = get_files_matching_func('\.yaml$') - assert ret == set(['manifest.yaml']) + assert ret == set(['hooks.yaml']) def test_does_not_include_deleted_fileS(get_files_matching_func):