You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm seeing internal errors with mypy 0.720's new semantic analyzer. No minimal reproducer yet, but perhaps you can make some sense of the traceback alone:
$ mypy --show-traceback fixtures.py
fixtures.py:55: error: INTERNAL ERROR -- Please try using mypy master on Github:
https://mypy.rtfd.io/en/latest/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 0.720
Traceback (most recent call last):
File "mypy/checkexpr.py", line 3404, in accept
File "mypy/nodes.py", line 1527, in accept
File "mypy/checkexpr.py", line 234, in visit_call_expr__ExpressionVisitor_glue
File "mypy/checkexpr.py", line 243, in visit_call_expr
File "mypy/checkexpr.py", line 315, in visit_call_expr_inner
File "mypy/checkexpr.py", line 670, in check_call_expr_with_callee_type
File "mypy/checkexpr.py", line 728, in check_call
File "mypy/checkexpr.py", line 835, in check_callable_call
File "mypy/checkexpr.py", line 573, in apply_function_plugin
File ".../lib/python3.7/site-packages/mypy_django_plugin/transformers/init_create.py", line 27, in redefine_and_typecheck_model_init
expected_types = extract_expected_types(ctx, model, is_init=True)
File ".../lib/python3.7/site-packages/mypy_django_plugin/transformers/init_create.py", line 163, in extract_expected_types
autofield_info = api.lookup_typeinfo('django.db.models.fields.AutoField')
File "mypy/checker.py", line 3721, in lookup_typeinfo
File "mypy/checker.py", line 3772, in lookup_qualified
AssertionError: Internal error: attempted lookup of unknown name
fixtures.py:55: : note: use --pdb to drop into pdb
Same thing with current django-stubs master.
Running mypy with the --no-new-semantic-analyzer flag works around it for now, but that flag is going away soon.
The text was updated successfully, but these errors were encountered:
This is a big rewrite incoming, which will be using Django's AppRegistry and new semantic analyzer, should be out in a week or so. Stay tuned, all those issues should be fixed there.
Since python/mypy#9783 is fixed, we can finally uncomment the refine checks that were not working previously.
Also, this PR fixes all remaining issues for the latest versions of both mypy and pyright.
I'm seeing internal errors with mypy 0.720's new semantic analyzer. No minimal reproducer yet, but perhaps you can make some sense of the traceback alone:
Same thing with current django-stubs master.
Running mypy with the
--no-new-semantic-analyzer
flag works around it for now, but that flag is going away soon.The text was updated successfully, but these errors were encountered: