Skip to content

Commit

Permalink
Use Collection over Sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
ximenesuk committed Sep 14, 2023
1 parent 211688c commit e17e983
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions etlhelper/etl.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
Iterator,
NamedTuple,
Optional,
Sequence,
Union,
)

Expand Down Expand Up @@ -324,7 +323,7 @@ def _execute_by_row(
query: str,
conn: Connection,
chunk: Chunk
) -> Sequence[NamedTuple]:
) -> list[NamedTuple]:
"""
Retry execution of rows individually and return failed rows along with
their errors. Successful inserts are committed. This is because
Expand Down
4 changes: 2 additions & 2 deletions etlhelper/types.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import (
Any,
Collection,
Protocol,
Sequence,
)


Expand All @@ -19,5 +19,5 @@ def cursor(self): # noqa Cursor Protocol not defined
...


Row = Sequence[Any]
Row = Collection[Any]
Chunk = list[Row]

0 comments on commit e17e983

Please sign in to comment.