CHG verbose > 0 printing call found, using typo file, print typo file
This commit is contained in:
parent
5814cb1cfe
commit
fab3edc45a
@ -219,6 +219,11 @@ def fix_typo(call, fullname, verbose=1):
|
|||||||
if not fix_typo.lines:
|
if not fix_typo.lines:
|
||||||
with open(path, 'r') as file:
|
with open(path, 'r') as file:
|
||||||
fix_typo.lines = file.readlines()
|
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
|
for line in fix_typo.lines[4:]: # starting with line 4
|
||||||
if len(fix_typo.spaces) == 0: # not initialized
|
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])]
|
fix_typo.spaces = [line.index(words[1]), line.index(words[2]), line.index(words[3])]
|
||||||
else:
|
else:
|
||||||
if call in line[2:8]:
|
if call in line[2:8]:
|
||||||
print(f'Call: {call} found')
|
if verbose > 0:
|
||||||
|
print(f'Call: {call} found')
|
||||||
match line[0]:
|
match line[0]:
|
||||||
case '#':
|
case '#':
|
||||||
if verbose > 1:
|
if verbose > 1:
|
||||||
|
Loading…
Reference in New Issue
Block a user