mypy icon indicating copy to clipboard operation
mypy copied to clipboard

Docs for `--install-types` do not explain `no mypy cache directory` error

Open cclauss opened this issue 4 years ago • 2 comments

Documentation

Docs for --install-types and --non-interactive do not mention .mypy-cache yet these options often fail (esp. in GitHub Actions, tox, pre-commit) with error: --install-types failed (no mypy cache directory) even after mkdir .mypy_cache has been run. The user may then experience a tremendous feeling of helplessness.

Probably caused by #10768 but the docs should help the user understand the misleading error message.

cclauss avatar Jul 24 '21 14:07 cclauss

Updated our make lint target with explicit cache in current working dir (install + lint in one command):

python -m mypy --install-types --non-interactive --cache-dir=.mypy_cache/

that got our CI green, would be a good default imo (e.g. behind the --non-interactive flag)

ddelange avatar Jan 08 '23 21:01 ddelange

Is this fixed? I'm encountering the same error.

ScottLinnn avatar Apr 21 '24 19:04 ScottLinnn