Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cclauss opened this issue Jul 24, 2021 · 2 comments
Open

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

cclauss opened this issue Jul 24, 2021 · 2 comments

Comments

@cclauss
Copy link
Contributor

cclauss commented Jul 24, 2021

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.

@ddelange
Copy link

ddelange commented Jan 8, 2023

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)

ferrarimarco added a commit to super-linter/super-linter that referenced this issue Feb 6, 2024
MyPy expects the cache directory to be there. We now remove it after
each super-linter run to avoid leftovers, so we need to create it before
runniny MyPy.

See python/mypy#10768
and python/mypy#10863
ferrarimarco added a commit to super-linter/super-linter that referenced this issue Feb 6, 2024
MyPy expects the cache directory to be there. We now remove it after
each super-linter run to avoid leftovers, so we need to create it before
running MyPy.

See python/mypy#10768
and python/mypy#10863
ferrarimarco added a commit to super-linter/super-linter that referenced this issue Feb 6, 2024
MyPy expects the cache directory to be there. We now remove it after
each super-linter run to avoid leftovers, so we need to create it before
running MyPy.

See python/mypy#10768
and python/mypy#10863
@ScottLinnn
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants