From 5e09aa0472c5cfc20ea5632556b3a49a9e7ceac7 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Fri, 6 Jun 2025 17:37:10 +0100 Subject: [PATCH 1/2] Improve help message --- Lib/sqlite3/__main__.py | 5 ++++- .../Library/2025-06-06-17-34-18.gh-issue-133934.yT1r68.rst | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Library/2025-06-06-17-34-18.gh-issue-133934.yT1r68.rst diff --git a/Lib/sqlite3/__main__.py b/Lib/sqlite3/__main__.py index 9e74b49ee828bc..c9280787a2b8fd 100644 --- a/Lib/sqlite3/__main__.py +++ b/Lib/sqlite3/__main__.py @@ -65,7 +65,10 @@ def runsource(self, source, filename="", symbol="single"): case "version": print(f"{sqlite3.sqlite_version}") case "help": - print("Enter SQL code and press enter.") + t = theme.syntax + print(f"Enter SQL code or one of the below commands, and press enter.\n\n" + f"{t.builtin}.version{t.reset} Print underlying SQLite library version\n" + f"{t.builtin}.quit{t.reset} Exit the CLI, equivalent to CTRL-D\n") case "quit": sys.exit(0) case "": diff --git a/Misc/NEWS.d/next/Library/2025-06-06-17-34-18.gh-issue-133934.yT1r68.rst b/Misc/NEWS.d/next/Library/2025-06-06-17-34-18.gh-issue-133934.yT1r68.rst new file mode 100644 index 00000000000000..4de7b4cceca977 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-06-06-17-34-18.gh-issue-133934.yT1r68.rst @@ -0,0 +1 @@ +Improve :mod:`sqlite3` CLI's ``.help`` message. From 8e0ef5310b71a7aa0203b3bc38089ed112bb52b5 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Date: Sat, 7 Jun 2025 08:31:45 +0100 Subject: [PATCH 2/2] Cover .help --- Lib/sqlite3/__main__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/sqlite3/__main__.py b/Lib/sqlite3/__main__.py index c9280787a2b8fd..244ff5a64b56d9 100644 --- a/Lib/sqlite3/__main__.py +++ b/Lib/sqlite3/__main__.py @@ -68,6 +68,7 @@ def runsource(self, source, filename="", symbol="single"): t = theme.syntax print(f"Enter SQL code or one of the below commands, and press enter.\n\n" f"{t.builtin}.version{t.reset} Print underlying SQLite library version\n" + f"{t.builtin}.help{t.reset} Print this help message\n" f"{t.builtin}.quit{t.reset} Exit the CLI, equivalent to CTRL-D\n") case "quit": sys.exit(0)