KEMBAR78
Add helpful message to assert in mypyc by thejcannon · Pull Request #12119 · python/mypy · GitHub
Skip to content

Conversation

@thejcannon
Copy link
Contributor

Description

I've been running mypyc on a codebase and hitting frequent AssertionError with no helpful message. This change simply adds a helpful error message so the next fool who runs into this doesn't have to poke through mypyc code to find out the problem.

Test Plan

N/A (Should a test be added? I didn't see any failure tests for irbuild 🤔 )

@thejcannon thejcannon changed the title Add helpful message to assert Add helpful message to assert in mypyc Feb 3, 2022
@JelleZijlstra
Copy link
Member

Seems reasonable, but really we shouldn't be hitting this assertion at all. Could you report a bug with an example that fails this assertion?

@thejcannon
Copy link
Contributor Author

Done #12120

@hauntsaninja hauntsaninja merged commit 04cac4b into python:master Feb 4, 2022
@hauntsaninja
Copy link
Collaborator

Thanks, this seems useful till this is properly supported!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants