Skip to content

Iterator of lists/tuples support for .insert_all() and .upsert_all()#673

Closed
simonw wants to merge 15 commits into
mainfrom
insert-lists
Closed

Iterator of lists/tuples support for .insert_all() and .upsert_all()#673
simonw wants to merge 15 commits into
mainfrom
insert-lists

Conversation

@simonw

@simonw simonw commented Nov 23, 2025

Copy link
Copy Markdown
Owner

@simonw simonw added the enhancement New feature or request label Nov 23, 2025
@codecov

codecov Bot commented Nov 23, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.61039% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.23%. Comparing base (dfb2dbe) to head (bf2a6ba).
⚠️ Report is 27 commits behind head on main.

Files with missing lines Patch % Lines
sqlite_utils/db.py 89.61% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #673      +/-   ##
==========================================
- Coverage   95.42%   95.23%   -0.20%     
==========================================
  Files           8        8              
  Lines        2930     2981      +51     
==========================================
+ Hits         2796     2839      +43     
- Misses        134      142       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@simonw

simonw commented Nov 23, 2025

Copy link
Copy Markdown
Owner Author
uv run --with-editable '.[mypy]' mypy sqlite_utils tests

Failures:

sqlite_utils/db.py:3426: error: Argument 1 to "fix_square_braces" has incompatible type "chain[Collection[Any]]"; expected "Iterable[dict[str, Any]]"  [arg-type]
sqlite_utils/db.py:3431: error: "Collection[Any]" has no attribute "keys"  [attr-defined]
sqlite_utils/db.py:3450: error: Argument 1 to "zip" has incompatible type "list[Any] | None"; expected "Iterable[Any]"  [arg-type]
sqlite_utils/db.py:3475: error: Argument 1 to "list" has incompatible type "list[Any] | None"; expected "Iterable[Any]"  [arg-type]
sqlite_utils/db.py:3530: error: Argument 1 to "hash_record" has incompatible type "Collection[Any]"; expected "dict[Any, Any]"  [arg-type]
sqlite_utils/db.py:3533: error: Value of type "Collection[Any]" is not indexable  [index]
sqlite_utils/db.py:3535: error: Value of type "Collection[Any]" is not indexable  [index]
Found 7 errors in 1 file (checked 55 source files)

@simonw

simonw commented Nov 23, 2025

Copy link
Copy Markdown
Owner Author

# Conflicts:
#	sqlite_utils/cli.py
#	tests/test_recipes.py
simonw added a commit that referenced this pull request Nov 23, 2025
@simonw

simonw commented Nov 23, 2025

Copy link
Copy Markdown
Owner Author

I landed this in 7ffd505

@simonw simonw closed this Nov 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.insert_all() and .upsert_all() to support iterator of Python lists/tuples

1 participant