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`.