Closed
Description
Bug Report
Receiving INTERNAL ERROR when running mypy .
on my project
To Reproduce
(Write your steps here:)
- Have the following dependencies
mypy==0.930
mypy-extensions==0.4.3
SQLAlchemy==1.4.29
sqlalchemy-stubs==0.4
SQLAlchemy-Utils==0.38.2
- Have the following code in your project
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
mypy .
Expected Behavior
Mypy generates error report as usual.
Actual Behavior
mypy --show-traceback .
...: error: INTERNAL ERROR -- Please try using mypy master on Github:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 0.930
Traceback (most recent call last):
File "mypy/semanal.py", line 5132, in accept
File "mypy/nodes.py", line 1140, in accept
File "mypy/semanal.py", line 2110, in visit_assignment_stmt
File "mypy/semanal.py", line 2392, in apply_dynamic_class_hook
File ".../lib/python3.8/site-packages/sqlmypy.py", line 203, in decl_info_hook
obj = ctx.api.builtin_type('builtins.object')
AttributeError: 'SemanticAnalyzer' object has no attribute 'builtin_type'
....: : note: use --pdb to drop into pdb
Your Environment
- Mypy version used: 0.930
- Mypy command-line flags: None
- Mypy configuration options from
mypy.ini
(and other config files):
[mypy]
disallow_untyped_defs = True
exclude = venv
plugins = sqlmypy
- Python version used: 3.8.7
- Operating system and version: MacOS 10.14.6