Revert "Adding failure condition for pickle file (#1497)"

This reverts commit 8da45ff037.
This commit is contained in:
Daniel W. Anner 2023-07-27 12:17:26 -04:00 committed by GitHub
parent d8cfdc3747
commit 57c57b6583

View File

@ -63,10 +63,6 @@ def _get_diff_from_upstream():
for file in changes:
# Ensure the files are modified or added, this will disclude deleted files
if file.change_type in CHANGE_TYPE_LIST:
# Check if the file is a .pickle file
if 'known-slugs.pickle' in file.__str__():
file_list.append(('tests/known-slugs.pickle', 'pickle'))
# If the file is renamed, ensure we are picking the right schema
if 'R' in file.change_type and path in file.rename_to:
file_list.append((file.rename_to, schema))
@ -124,9 +120,6 @@ def test_definitions(file_path, schema):
"""
Validate each definition file using the provided JSON schema and check for duplicate entries.
"""
if schema == 'pickle':
pytest.fail(f'Pickle file modification detected: {file_path}\nPlease revert and remove the pickle file from your commit.', False)
# Check file extension. Only .yml or .yaml files are supported.
assert file_path.split('.')[-1] in ('yaml', 'yml'), f"Invalid file extension: {file_path}"