1
0
mirror of https://github.com/ilri/csv-metadata-quality.git synced 2024-11-18 20:17:04 +01:00

csv_metadata_quality/fix.py: Fix indent

This commit is contained in:
Alan Orth 2019-07-29 17:14:48 +03:00
parent fa4fa3491b
commit 50ae4e17f2
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -24,8 +24,8 @@ def whitespace(field):
pattern = re.compile(r'\s{2,}') pattern = re.compile(r'\s{2,}')
match = re.findall(pattern, value) match = re.findall(pattern, value)
print(f'Excessive whitespace: {value}')
if match: if match:
print(f'Excessive whitespace: {value}')
value = re.sub(pattern, ' ', value) value = re.sub(pattern, ' ', value)
# Save cleaned value # Save cleaned value