Skip to content

Commit 776af90

Browse files
committed
Merge branch 'fix-keeping-part-of-previous-commands' of https://github.com/tanloong/cpython into fix-keeping-part-of-previous-commands
2 parents 212e63b + 93ba713 commit 776af90

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

Lib/sqlite3/__main__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ def main(*args):
136136
# Use RL_PROMPT_START_IGNORE (\001) and RL_PROMPT_END_IGNORE (\002) to
137137
# bracket non-printing characters. This tells readline to ignore them
138138
# when calculating screen space for redisplay during history scrolling.
139-
# See https://stackoverflow.com/a/9468954 for more details.
140139
sys.ps1 = f"\001{s.prompt}\002sqlite> \001{s.reset}\002"
141140
sys.ps2 = f"\001{s.prompt}\002 ... \001{s.reset}\002"
142141

Lib/test/test_sqlite3/test_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ def test_interact_on_disk_file(self):
202202
def test_color(self):
203203
with unittest.mock.patch("_colorize.can_colorize", return_value=True):
204204
out, err = self.run_cli(commands="TEXT\n")
205-
self.assertIn("\001\x1b[1;35m\002sqlite> \001\x1b[0m\002", out)
206-
self.assertIn("\001\x1b[1;35m\002 ... \001\x1b[0m\002\001\x1b", out)
205+
self.assertIn("\x01\x1b[1;35m\x02sqlite> \x01\x1b[0m\x02", out)
206+
self.assertIn("\x01\x1b[1;35m\x02 ... \x01\x1b[0m\x02\x01\x1b", out)
207207
out, err = self.run_cli(commands=("sel;",))
208208
self.assertIn('\x1b[1;35mOperationalError (SQLITE_ERROR)\x1b[0m: '
209209
'\x1b[35mnear "sel": syntax error\x1b[0m', err)

0 commit comments

Comments
 (0)