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

Fix --install-types masking failure details #17485

Merged
merged 3 commits into from
Dec 30, 2024

Conversation

wyattscarpenter
Copy link
Contributor

It seems that: if the mypy cache dir wasn't created, this code would do an exit, preventing the actual errors from being printed. So I've removed the exit. More information is available at the issue I claim this fixes.

Fixes #10768

It seems that if the mypy cache dir wasn't created, this code would do an exit, preventing the actual errors from being printed. So I've removed the exit.

This comment has been minimized.

@wyattscarpenter wyattscarpenter changed the title Fix https://github.com/python/mypy/issues/10768 Fix: --install-types can mask failure details (#10768) (https://github.com/python/mypy/issues/10768) Jul 24, 2024
@wyattscarpenter
Copy link
Contributor Author

wyattscarpenter commented Aug 20, 2024

I should add that I've confirmed this works using https://github.com/tk-woven/mypy-install-types-mre

I've installed my patch branch as a git source in pip, and it works on the mre. In contrast, when I installed the current mypy master (mypy 1.12.0+dev.fe15ee69b9225f808f8ed735671b73c31ae1bed8 (compiled: no)) as a git source in pip, it still has the error: --install-types failed (no mypy cache directory) error.

I've been using the mypy from my patch branch as a daily driver and haven't noticed any other problems resulting from this change (although theoretically there could be some obscure edge case I just don't run into).

@wyattscarpenter
Copy link
Contributor Author

As a note to myself: if this pr is accepted, or the issue is otherwise fixed, I can get rid of the workaround I added to this other project: https://github.com/databricks/databricks-sql-python/blob/main/.github/workflows/code-quality-checks.yml#L164

@hauntsaninja hauntsaninja changed the title Fix: --install-types can mask failure details (#10768) (https://github.com/python/mypy/issues/10768) Fix --install-types masking failure details Dec 30, 2024
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@hauntsaninja hauntsaninja merged commit 7b61945 into python:master Dec 30, 2024
18 checks passed
@wyattscarpenter wyattscarpenter deleted the patch-1 branch January 2, 2025 01:47
wyattscarpenter added a commit to wyattscarpenter/databricks-sql-python that referenced this pull request Jan 2, 2025
v1.14.1 is the current version, and python/mypy#17485 has the "upnext" label, so 1.15 should do
wyattscarpenter added a commit to wyattscarpenter/databricks-sql-python that referenced this pull request Jan 2, 2025
wyattscarpenter added a commit to wyattscarpenter/databricks-sql-python that referenced this pull request Mar 11, 2025
v1.14.1 is the current version, and python/mypy#17485 has the "upnext" label, so 1.15 should do
wyattscarpenter added a commit to wyattscarpenter/databricks-sql-python that referenced this pull request Mar 11, 2025
wyattscarpenter added a commit to wyattscarpenter/databricks-sql-python that referenced this pull request Mar 11, 2025
v1.14.1 is the current version, and python/mypy#17485 has the "upnext" label, so 1.15 should do

Signed-off-by: wyattscarpenter <wyattscarpenter@gmail.com>
wyattscarpenter added a commit to wyattscarpenter/databricks-sql-python that referenced this pull request Mar 11, 2025
see python/mypy#17485 or python/mypy#10768 for more information

Signed-off-by: wyattscarpenter <wyattscarpenter@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--install-types can mask failure details
2 participants