Skip to content

Commit

Permalink
Disgusting fix for help state restoration
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogsal committed Apr 28, 2024
1 parent 254aaf2 commit cf9bd26
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Lib/_pyrepl/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,13 @@ class help(Command):
def do(self):
import _sitebuiltins
self.reader.console.restore()
backup_ps = {}
for ps in ("ps1", "ps2", "ps3", "ps4"):
backup_ps[ps] = getattr(self.reader, ps)
self.reader.msg = _sitebuiltins._Helper()()
for ps in ("ps1", "ps2", "ps3", "ps4"):
setattr(self.reader, ps, backup_ps[ps])
self.reader.prepare()
self.reader.dirty = 1


Expand Down

0 comments on commit cf9bd26

Please sign in to comment.