Skip to content

Commit a186c13

Browse files
committed
Type annotation for records on insert_all/upsert_all, refs #672
1 parent 975b6c6 commit a186c13

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

sqlite_utils/db.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
Dict,
3232
Generator,
3333
Iterable,
34+
Sequence,
3435
Union,
3536
Optional,
3637
List,
@@ -3321,7 +3322,10 @@ def insert(
33213322

33223323
def insert_all(
33233324
self,
3324-
records,
3325+
records: Union[
3326+
Iterable[Dict[str, Any]],
3327+
Iterable[Sequence[Any]],
3328+
],
33253329
pk=DEFAULT,
33263330
foreign_keys=DEFAULT,
33273331
column_order=DEFAULT,
@@ -3576,7 +3580,10 @@ def upsert(
35763580

35773581
def upsert_all(
35783582
self,
3579-
records,
3583+
records: Union[
3584+
Iterable[Dict[str, Any]],
3585+
Iterable[Sequence[Any]],
3586+
],
35803587
pk=DEFAULT,
35813588
foreign_keys=DEFAULT,
35823589
column_order=DEFAULT,

0 commit comments

Comments
 (0)