Closed tkhattra closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
9286c1b
) 95.77% compared to head (1698a9d
) 95.72%. Report is 1 commits behind head on main.:exclamation: Current head 1698a9d differs from pull request most recent head 61c6e26. Consider uploading reports for the commit 61c6e26 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This looks really great on first glance - design is good, implementation is solid, tests and documentation look great.
Looks like a couple of mypy
failures in the tests at the moment:
mypy sqlite_utils tests
sqlite_utils/db.py:543: error: Incompatible types in assignment (expression has type "type[Table]", variable has type "type[View]") [assignment]
tests/test_lookup.py:156: error: Name "test_lookup_new_table" already defined on line 5 [no-redef]
Found 2 errors in 2 files (checked 54 source files)
Error: Process completed with exit code 1.
Apologies - I pushed a fix that addresses the mypy failures.
Also tested this manually like so:
sqlite-utils create-table strict.db strictint id integer size integer --strict
sqlite-utils create-table strict.db notstrictint id integer size integer
sqlite-utils install sqlite-utils-shell
sqlite-utils shell strict.db
Attached to strict.db
Type 'exit' to exit.
sqlite-utils> insert into strictint (size) values (4);
1 row affected
sqlite-utils> insert into strictint (size) values ('four');
An error occurred: cannot store TEXT value in INTEGER column strictint.size
sqlite-utils> insert into notstrictint (size) values ('four');
1 row affected
sqlite-utils> commit;
Done
Make
table.transform()
preserve STRICT mode.:books: Documentation preview :books:: https://sqlite-utils--604.org.readthedocs.build/en/604/