Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b89962e

Browse files
authored
Merge pull request #513 from pre-commit/always_run_regression
Fix regression in 0.13.5 with always_run + files
2 parents e1cdbb3 + ce2f68b commit b89962e

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

pre_commit/clientlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def _make_argparser(filenames_help):
3838

3939
schema.Conditional(
4040
'files', schema.check_and(schema.check_string, schema.check_regex),
41-
condition_key='always_run', condition_value=False, ensure_absent=True,
41+
condition_key='always_run', condition_value=False,
4242
),
4343

4444
schema.Optional(

tests/clientlib_test.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,20 @@ def test_validate_manifest_main(args, expected_output):
187187
}],
188188
True,
189189
),
190+
(
191+
# A regression in 0.13.5: always_run and files are permissible
192+
# together (but meaningless). In a future version upgrade this to
193+
# an error
194+
[{
195+
'id': 'a',
196+
'name': 'b',
197+
'entry': 'c',
198+
'language': 'python',
199+
'files': '',
200+
'always_run': True,
201+
}],
202+
True,
203+
),
190204
)
191205
)
192206
def test_valid_manifests(manifest_obj, expected):

0 commit comments

Comments
 (0)