mirror of
https://github.com/ilri/csv-metadata-quality.git
synced 2025-05-11 23:56:00 +02:00
Test Python regular expression matches directly
Match objects always have a boolean value of True. See: https://docs.python.org/3.7/library/re.html
This commit is contained in:
@ -69,7 +69,7 @@ def separators(field):
|
||||
# After splitting, see if there are any remaining "|" characters
|
||||
match = re.findall(r'^.*?\|.*$', value)
|
||||
|
||||
if len(match) > 0:
|
||||
if match:
|
||||
print(f'Invalid multi-value separator: {field}')
|
||||
|
||||
return field
|
||||
|
Reference in New Issue
Block a user