diff options
author | Amjith Ramanujam <amjith.r@gmail.com> | 2024-05-03 10:13:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-03 10:13:08 -0700 |
commit | 0678e03653a4f31eb41c6cf06f08e3ff58390557 (patch) | |
tree | cca58d327eb006259fcefbad63d5dcbbc97cb46e | |
parent | 02718a609a3720e186b0b5a19ccefed51d52832a (diff) | |
parent | 95eee73153f7e5f34451fc44c37bc3c1a8207ecd (diff) |
Merge pull request #178 from dbcli/random-stuff
Random stuff
-rw-r--r-- | .github/workflows/ci.yml | 2 | ||||
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | TODO.md | 6 | ||||
-rw-r--r-- | litecli/main.py | 10 | ||||
-rw-r--r-- | litecli/packages/special/dbcommands.py | 2 |
6 files changed, 16 insertions, 12 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ee36cf..d4de9d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 21b4121..fce91e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ ## Upcoming - TBD -### Features +### Improvements + +* When an empty `\d` is invoked the list of tables are returned instead of an error. +* Show SQLite version at startup. ### Bug Fixes @@ -1,3 +0,0 @@ -* [] Sort by frecency. -* [] Add completions when an attach database command is run. -* [] Add behave tests. @@ -0,0 +1,6 @@ +* [ ] Change to use ruff +* [ ] Automate the release process via GH actions. [Article](https://simonwillison.net/2024/Jan/16/python-lib-pypi/) + +* [] Sort by frecency. +* [] Add completions when an attach database command is run. +* [] Add behave tests. diff --git a/litecli/main.py b/litecli/main.py index 35638bd..ebbc5ba 100644 --- a/litecli/main.py +++ b/litecli/main.py @@ -10,7 +10,7 @@ from time import time from datetime import datetime from io import open from collections import namedtuple -from sqlite3 import OperationalError +from sqlite3 import OperationalError, sqlite_version import shutil from cli_helpers.tabular_output import TabularOutputFormatter @@ -380,10 +380,8 @@ class LiteCli(object): key_bindings = cli_bindings(self) if not self.less_chatty: - print("Version:", __version__) - print("Mail: https://groups.google.com/forum/#!forum/litecli-users") + print(f"LiteCli: {__version__} (SQLite: {sqlite_version})") print("GitHub: https://github.com/dbcli/litecli") - # print("Home: https://litecli.com") def get_message(): prompt = self.get_prompt(self.prompt_format) @@ -823,7 +821,7 @@ class LiteCli(object): headers, format_name="vertical" if expanded else None, column_types=column_types, - **output_kwargs + **output_kwargs, ) if isinstance(formatted, (text_type)): @@ -845,7 +843,7 @@ class LiteCli(object): headers, format_name="vertical", column_types=column_types, - **output_kwargs + **output_kwargs, ) if isinstance(formatted, (text_type)): formatted = iter(formatted.splitlines()) diff --git a/litecli/packages/special/dbcommands.py b/litecli/packages/special/dbcommands.py index dec3507..687c9a4 100644 --- a/litecli/packages/special/dbcommands.py +++ b/litecli/packages/special/dbcommands.py @@ -224,7 +224,7 @@ def describe(cur, arg, **_): arg ) else: - raise ArgumentMissing("Table name required.") + return list_tables(cur) log.debug(query) cur.execute(query) |