Skip to content

Commit bb0200a

Browse files
committed
suggestion does not compute full match distance
1 parent ba55af2 commit bb0200a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/traceback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@ def _find_keyword_typos(self):
14951495
if not suggestion or suggestion == wrong_name:
14961496
continue
14971497
# semantic edge case
1498-
if suggestion == 'switch':
1498+
if suggestion == 'switch' or wrong_name == 'switch':
14991499
suggestion = 'match'
15001500
# Try to replace the token with the keyword
15011501
the_lines = error_lines.copy()

0 commit comments

Comments
 (0)