Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if pattern is None:
pattern = ''
if string is None:
string = ''
# Use "$" to mark end of line with trailing space
if re.search(r'\s+$', string):
string += '$'
if re.search(r'\s+$', pattern):
pattern += '$'
pattern = pattern.replace("\t", "\\t")
string = string.replace("\t", "\\t")
print(pattern.ljust(maxlen+1), '| ', string, end='')
if ok:
print()
else:
print(pdbpp.Color.set(pdbpp.Color.red, ' <<<<<'))
all_ok = False
assert all_ok