Skip to content

Raise custom error when builtin symbol is missing #2062

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

Merged

Conversation

Michael0x2a
Copy link
Collaborator

A common point of confusion people have when working on the mypy codebase is forgetting to include the appropriate builtin fixture to their unit tests. In particular, not including a fixture (or the right fixture) can result in a cryptic exception when the code attempts to look up the builtin symbol and fails.

This commit adds a check to the most common failure point and raises a custom exception when it detects a builtin symbol is missing (which should never happen when running mypy normally).

A common point of confusion people have when working on the mypy
codebase is forgetting to include the appropriate builtin fixture to
their unit tests. In particular, not including a fixture (or the right
fixture) can result in a cryptic exception when the code attempts to
look up the builtin symbol and fails.

This commit adds a check to the most common failure point and raises a
custom exception when it detects a builtin symbol is missing (which
should never happen when running mypy normally).
@gvanrossum gvanrossum merged commit 347cd58 into python:master Aug 28, 2016
@Michael0x2a Michael0x2a deleted the warn-when-builtin-symbol-is-missing branch September 1, 2016 21:03
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