Skip to content

Conversation

@simonw
Copy link
Owner

@simonw simonw commented May 9, 2025

@simonw simonw added enhancement New feature or request python-library labels May 9, 2025
@simonw
Copy link
Owner Author

simonw commented May 9, 2025

mypy failures:

sqlite_utils/db.py:3675: error: Item "str" of "str | Table" has no attribute "name"  [union-attr]
sqlite_utils/db.py:3681: error: Item "str" of "str | Table" has no attribute "name"  [union-attr]
sqlite_utils/db.py:3687: error: Item "str" of "str | Table" has no attribute "name"  [union-attr]
sqlite_utils/db.py:3702: error: Item "str" of "str | Table" has no attribute "insert"  [union-attr]
sqlite_utils/db.py:3707: error: Item "str" of "str | Table" has no attribute "name"  [union-attr]
sqlite_utils/db.py:3713: error: Item "str" of "str | Table" has no attribute "lookup"  [union-attr]
sqlite_utils/db.py:3716: error: Item "str" of "str | Table" has no attribute "name"  [union-attr]

@codecov
Copy link

codecov bot commented May 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.60%. Comparing base (d892d2a) to head (9b2136b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #658      +/-   ##
==========================================
+ Coverage   95.56%   95.60%   +0.04%     
==========================================
  Files           8        8              
  Lines        2911     2915       +4     
==========================================
+ Hits         2782     2787       +5     
+ Misses        129      128       -1     

☔ 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
Copy link
Owner Author

simonw commented May 9, 2025

The biggest remaining change is to go through the python-api.rst documentation and replace all the db["table"] things with the newly recommended db.table("...") syntax.

@simonw
Copy link
Owner Author

simonw commented May 9, 2025

I used VS Code search and replace:

db\["(.*?)"\]

Replace with:

db.table("$1")

I'm worried I may have clobbered some view examples though. Need to check for that.

@simonw simonw marked this pull request as ready for review May 9, 2025 06:07
@simonw
Copy link
Owner Author

simonw commented May 9, 2025

Before landing this I should fix the 2 lines of missing coverage.

@simonw simonw merged commit 094b010 into main May 9, 2025
86 checks passed
@simonw simonw deleted the table-views branch May 9, 2025 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request python-library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants