]> git.ipfire.org Git - thirdparty/psycopg.git/commit
chore: avoid using SQLite cache in Mypy runs master
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 1 Apr 2026 10:55:24 +0000 (12:55 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 1 Apr 2026 16:04:29 +0000 (18:04 +0200)
commiteaeb5edeb1f08c6930d5598237136fbe167e0317
tree88c681e303e38b97ec0931b46e5b5b1445a44e02
parenteb87f0eb58ee05b7202b7d8835b925b084d32b5c
chore: avoid using SQLite cache in Mypy runs

Since Mypy 1.20 the SQLite cache is used by default. This highlights
Mypy concurrency issues running pre-commit in the CI, which are known to
the project devs but which we practically never encountered using the
file-based cache. See https://github.com/python/mypy/issues/21136.

The alternative solution of avoiding parallel Mypy runs in pre-commit
using `require_serial: false`, reveals other issues such as
https://github.com/python/mypy/issues/17362.

An alternative which would probably work could be to pass no file names
to mypy and re-mypy the entire codebase at every commit using
`pass_filenames: false`. See https://github.com/python/mypy/issues/13916.
This for me seems about 25% slower when changing a single file.

This commit restores the 1.19 behaviour of using the file-based cache,
which was working adequately for us. In the future we may decide to move
to `pass_filenames: false`.
pyproject.toml