CHG verbose > 0 printing call found, using typo file, print typo file

This commit is contained in:
Thomas Kuschel 2024-06-17 20:01:16 +02:00
parent 5814cb1cfe
commit fab3edc45a

View File

@ -219,6 +219,11 @@ def fix_typo(call, fullname, verbose=1):
if not fix_typo.lines:
with open(path, 'r') as file:
fix_typo.lines = file.readlines()
if verbose > 0:
print(f'File "{fixtypofile}":')
for line in fix_typo.lines:
print(f'>> {line.rstrip()}')
print('>> ** EOF **')
for line in fix_typo.lines[4:]: # starting with line 4
if len(fix_typo.spaces) == 0: # not initialized
@ -228,7 +233,8 @@ def fix_typo(call, fullname, verbose=1):
fix_typo.spaces = [line.index(words[1]), line.index(words[2]), line.index(words[3])]
else:
if call in line[2:8]:
print(f'Call: {call} found')
if verbose > 0:
print(f'Call: {call} found')
match line[0]:
case '#':
if verbose > 1: