Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random stuff #178

Merged
merged 5 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading