From 80c5e1b05a5a4dd5e3a312b1f1909b586b097aa3 Mon Sep 17 00:00:00 2001 From: Nicholas FitzRoy-Dale Date: Tue, 2 Jan 2024 00:24:27 +0000 Subject: [PATCH] Some type fixes --- rime/sql.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rime/sql.py b/rime/sql.py index 20a39e3..06b7e08 100644 --- a/rime/sql.py +++ b/rime/sql.py @@ -14,12 +14,14 @@ import pypika.utils import pypika.queries from pypika.terms import Term, Field, Star, Function, ArithmeticExpression +from pypika.queries import QueryException import sqlite3 Table = pypika.Table # Query is defined below (we use a custom one) Column = pypika.Column Parameter = pypika.Parameter +Connection = sqlite3.Connection def _sqlite3_regexp_search(pattern, input): @@ -111,7 +113,7 @@ def _validate_returning_term(self, term: Term) -> None: raise QueryException("You can't return from other tables") @pypika.utils.builder - def returning(self, *terms: Any) -> "SqliteQueryBuilder": + def returning(self, *terms: Any) -> "SqliteQueryBuilder": # type: ignore for term in terms: if isinstance(term, Field): self._return_field(term)