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

@ -44,6 +44,7 @@ def big_db_to_analyze_path(tmpdir):
}
)
db["stuff"].insert_all(to_insert)
db.close()
return path
@ -137,6 +138,7 @@ def db_to_analyze_path(db_to_analyze, tmpdir):
db = sqlite3.connect(path)
sql = "\n".join(db_to_analyze.iterdump())
db.executescript(sql)
db.close()
return path
@ -311,6 +313,7 @@ def test_analyze_table_validate_columns(tmpdir, args, expected_error):
"age": 5,
}
)
db.close()
result = CliRunner().invoke(
cli.cli,
["analyze-tables", path] + args,