mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-26 10:54:32 +02:00
* Automated upgrades by Ruff
uvx --with 'ruff>=0.16.0' ruff check . --fix --unsafe-fixes
* Fix remaining Ruff errors with GPT-5.6 Sol high
https://gist.github.com/simonw/6da7906a9fea6e90da131c21a9055199
* Fix flake E501 long lines
* New Protocol for migrations to make ty happy
17 lines
455 B
Python
17 lines
455 B
Python
import sqlite3
|
|
|
|
import click
|
|
from pluggy import HookimplMarker, HookspecMarker
|
|
|
|
hookspec = HookspecMarker("sqlite_utils")
|
|
hookimpl = HookimplMarker("sqlite_utils")
|
|
|
|
|
|
@hookspec
|
|
def register_commands(cli: click.Group) -> None:
|
|
"""Register additional CLI commands, e.g. 'sqlite-utils mycommand ...'"""
|
|
|
|
|
|
@hookspec
|
|
def prepare_connection(conn: sqlite3.Connection) -> None:
|
|
"""Modify SQLite connection in some way e.g. register custom SQL functions"""
|