This repository was archived by the owner on Sep 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ skip-string-normalization = true
110110ignore = [
111111 " ANN101" , # missing-type-self
112112 " ANN102" , # missing-type-cls
113+ " FIX002" , # line-contains-todo
113114]
114115line-length = 100
115116select = [
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ class SQLeanDialect(SQLiteDialect_pysqlite):
8484
8585 driver = "sqlean"
8686 supports_statement_cache = True
87- type_compiler_cls = SQLeanTypeCompiler
87+ type_compiler = SQLeanTypeCompiler
8888
8989 @classmethod
9090 def dbapi (cls ) -> ModuleType : # type: ignore[override]
Original file line number Diff line number Diff line change @@ -71,9 +71,13 @@ def result_processor(
7171 """Return a result processor."""
7272 return none_or_ip_interface
7373
74+ # TODO(edgarrmondragon): Add missing type parameters:
75+ # > sqltypes.Indexable.Comparator[IPAddress]
76+ # > sqltypes.Concatenable.Comparator[IPAddress]
77+ # https://github.com/edgarrmondragon/sqlean-driver/issues/37
7478 class Comparator (
75- sqltypes .Indexable .Comparator [ IPAddress ],
76- sqltypes .Concatenable .Comparator [ IPAddress ],
79+ sqltypes .Indexable .Comparator , # type: ignore[type-arg]
80+ sqltypes .Concatenable .Comparator , # type: ignore[type-arg]
7781 ):
7882 """Comparator for the INET type."""
7983
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ def test_ipaddr_types(
8787 """Test that the types work."""
8888 engine = create_engine ("sqlite+sqlean:///:memory:?extensions=ipaddr" )
8989 metadata .create_all (engine )
90- with engine .connect () as conn :
90+ with engine .connect () as conn , conn . begin () :
9191 conn .execute (table .insert (), data )
9292 result = conn .execute (query )
9393 assert result .fetchone () == expected
@@ -112,7 +112,7 @@ def test_uuid_types(
112112 """Test that the types work."""
113113 engine = create_engine ("sqlite+sqlean:///:memory:?extensions=uuid" )
114114 metadata .create_all (engine )
115- with engine .connect () as conn :
115+ with engine .connect () as conn , conn . begin () :
116116 conn .execute (table .insert (), data )
117117 result = conn .execute (query )
118118 assert result .fetchone () == expected
You can’t perform that action at this time.
0 commit comments