Skip to content

Commit

Permalink
Merge pull request #178 from dbcli/random-stuff
Browse files Browse the repository at this point in the history
Random stuff
  • Loading branch information
amjith committed May 3, 2024
2 parents 02718a6 + 95eee73 commit 0678e03
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 0 additions & 3 deletions TODO

This file was deleted.

6 changes: 6 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 4 additions & 6 deletions litecli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
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
Expand Down Expand Up @@ -380,10 +380,8 @@ def run_cli(self):
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)
Expand Down Expand Up @@ -823,7 +821,7 @@ def get_col_type(col):
headers,
format_name="vertical" if expanded else None,
column_types=column_types,
**output_kwargs
**output_kwargs,
)

if isinstance(formatted, (text_type)):
Expand All @@ -845,7 +843,7 @@ def get_col_type(col):
headers,
format_name="vertical",
column_types=column_types,
**output_kwargs
**output_kwargs,
)
if isinstance(formatted, (text_type)):
formatted = iter(formatted.splitlines())
Expand Down
2 changes: 1 addition & 1 deletion litecli/packages/special/dbcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0678e03

Please sign in to comment.