Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7484390

Browse files
committed
Show didyoumean suggestions in shell
1 parentd6eb90e commit7484390

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎backend/main/views.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ def run_code(self, code, source, page_index, step_index):
9797
ifnotresult["awaiting_input"]:
9898
traceback_info=result["traceback_info"]
9999
iftraceback_info:
100-
ifsource=="shell"andlen(traceback_info)==1andlen(traceback_info[0]["frames"])==1:
100+
if (
101+
source=="shell"
102+
andlen(traceback_info)==1
103+
andlen(traceback_info[0]["frames"])==1
104+
andnottraceback_info[0]["didyoumean"]
105+
):
101106
exception=traceback_info[0]["exception"]
102107
output_parts.append(
103108
dict(text=f"{exception['type']}:{exception['message']}\n",color="red")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp