Claude Code helped fix a ton of .close() warnings, refs #692

https://gistpreview.github.io/?730f0c5dc38528a1dd0615f330bd5481
This commit is contained in:
Simon Willison 2025-12-11 16:23:38 -08:00
commit 81b0599078
6 changed files with 119 additions and 30 deletions

View file

@ -328,9 +328,11 @@ def test_memory_return_db(tmpdir):
from sqlite_utils.cli import cli
path = str(tmpdir / "dogs.csv")
open(path, "w").write("id,name\n1,Cleo")
with open(path, "w") as f:
f.write("id,name\n1,Cleo")
with click.Context(cli) as ctx:
db = ctx.invoke(cli.commands["memory"], paths=(path,), return_db=True)
assert db.table_names() == ["dogs"]
db.close()