From b3942fb34f6b37e8c91d2edd24d10701e8b21e17 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Wed, 7 May 2025 17:25:57 -0700 Subject: [PATCH] Compatible with latest black --- sqlite_utils/db.py | 9 +-------- tests/test_cli.py | 4 ++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/sqlite_utils/db.py b/sqlite_utils/db.py index 5c1cc99..144330a 100644 --- a/sqlite_utils/db.py +++ b/sqlite_utils/db.py @@ -237,37 +237,30 @@ if pd: class AlterError(Exception): "Error altering table" - pass class NoObviousTable(Exception): "Could not tell which table this operation refers to" - pass class NoTable(Exception): "Specified table does not exist" - pass class BadPrimaryKey(Exception): "Table does not have a single obvious primary key" - pass class NotFoundError(Exception): "Record not found" - pass class PrimaryKeyRequired(Exception): "Primary key needs to be specified" - pass class InvalidColumns(Exception): "Specified columns do not exist" - pass class DescIndex(str): @@ -3852,7 +3845,7 @@ def jsonify_if_needed(value): def resolve_extracts( - extracts: Optional[Union[Dict[str, str], List[str], Tuple[str]]] + extracts: Optional[Union[Dict[str, str], List[str], Tuple[str]]], ) -> dict: if extracts is None: extracts = {} diff --git a/tests/test_cli.py b/tests/test_cli.py index 4e564f1..4033af6 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -916,7 +916,7 @@ def test_query_json_with_json_cols(db_path): @pytest.mark.parametrize( "content,is_binary", - [(b"\x00\x0Fbinary", True), ("this is text", False), (1, False), (1.5, False)], + [(b"\x00\x0fbinary", True), ("this is text", False), (1, False), (1.5, False)], ) def test_query_raw(db_path, content, is_binary): Database(db_path)["files"].insert({"content": content}) @@ -931,7 +931,7 @@ def test_query_raw(db_path, content, is_binary): @pytest.mark.parametrize( "content,is_binary", - [(b"\x00\x0Fbinary", True), ("this is text", False), (1, False), (1.5, False)], + [(b"\x00\x0fbinary", True), ("this is text", False), (1, False), (1.5, False)], ) def test_query_raw_lines(db_path, content, is_binary): Database(db_path)["files"].insert_all({"content": content} for _ in range(3))