Skip to content

Commit 2bf5367

Browse files
Update traceback.py
1 parent 906310b commit 2bf5367

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/traceback.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ def _compute_suggestion_error(exc_value, tb, wrong_name):
16591659
module_result = _calculate_closed_name(wrong_name, i)
16601660
if module_result:
16611661
_close_name_list.append(module_result)
1662-
_close_name_list.sorted()
1662+
_close_name_list.sort()
16631663
return _closed_name_list[0]
16641664
else:
16651665
if wrong_name in sum(list_d, []):
@@ -1677,7 +1677,7 @@ def _compute_suggestion_error(exc_value, tb, wrong_name):
16771677
module_result = _calculate_closed_name(wrong_name, i)
16781678
if module_result:
16791679
_close_name_list.append(module_result)
1680-
_close_name_list.sorted()
1680+
_close_name_list.sort()
16811681
return _closed_name_list[0]
16821682
else:
16831683
if (_closed_name := _calculate_closed_name(module_name, sorted(sys.stdlib_module_names))):
@@ -1687,7 +1687,7 @@ def _compute_suggestion_error(exc_value, tb, wrong_name):
16871687
module_result = _calculate_closed_name(wrong_name, i)
16881688
if module_result:
16891689
_close_name_list.append(module_result)
1690-
_close_name_list.sorted()
1690+
_close_name_list.sort()
16911691
return _closed_name_list[0]
16921692

16931693
if not os.path.exists(path) or not os.path.isdir(path):

0 commit comments

Comments
 (0)