Skip to content

Commit e4f856e

Browse files
committed
Fix sqlite flakiness
1 parent 756c310 commit e4f856e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mypy/metastore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def close(self) -> None:
157157
def connect_db(db_file: str) -> sqlite3.Connection:
158158
import sqlite3.dbapi2
159159

160-
db = sqlite3.dbapi2.connect(db_file)
160+
db = sqlite3.dbapi2.connect(db_file, check_same_thread=False)
161161
# This is a bit unfortunate (as we may get corrupt cache after e.g. Ctrl + C),
162162
# but without this flag, commits are *very* slow, especially when using HDDs,
163163
# see https://www.sqlite.org/faq.html#q19 for details.

0 commit comments

Comments
 (0)