Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bcc84fb

Browse files
author
Matthias Bussonnier
committed
Fix the right inputhook
Interactive shell and debugger have similar code. The fix was applied to the wrong one, not sure how test were passing.
1 parent 8e34b1a commit bcc84fb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

IPython/terminal/debugger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def get_prompt_tokens():
6666
)
6767

6868
if not PTK3:
69-
options['inputhook'] = self.inputhook
69+
options['inputhook'] = self.shell.inputhook
7070
self.pt_app = PromptSession(**options)
7171

7272
def cmdloop(self, intro=None):

IPython/terminal/interactiveshell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ def get_message():
438438
Condition(lambda: self.highlight_matching_brackets))],
439439
}
440440
if not PTK3:
441-
options['inputhook'] = self.shell.inputhook
441+
options['inputhook'] = self.inputhook
442442

443443
return options
444444

0 commit comments

Comments
 (0)