-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Bogus undefined name error with generic type alias #7092
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
Comments
This sounds similar to #7077. |
Maybe similar, but this happens also without any special configuration so I'd say it is more severe based on that. Can this issue get any labels, like "bug"? |
This still happens on master (and is pretty embarrassing). |
Any news on this? This is currently causing us to copy & paste type definitions around in https://github.com/open-telemetry/opentelemetry-python (e.g. https://github.com/open-telemetry/opentelemetry-python/blob/84f589b6f8a4770c3c6ce29c7b352b1972241c4f/opentelemetry-api/src/opentelemetry/trace/__init__.py#L497-L502) |
I've tried this example with mypy version |
Thanks for checking! mypy_primer indicates this was fixed by #7885 |
Bug.
or a mock-up repro if the source is private. We would appreciate
if you try to simplify your case to a minimal repro.
This requires two modules to trigger the bug:
dummy.py:
dummy2.py:
Note that line 4 is empty. You can also add comments to get a different line number displacement. Also note that
T
is never referred to indummy2
.I would expect no errors for this code.
I didn't try.
None. The command line is shown in full, there is no config file.
The text was updated successfully, but these errors were encountered: