$ cat << EOF > t.py
import alembic
EOF
$ mypy --no-implicit-reexport t.py
Traceback (most recent call last):
File "[...]/bin/mypy", line 8, in <module>
sys.exit(console_entry())
File "[...]/lib/python3.9/site-packages/mypy/__main__.py", line 11, in console_entry
main(None, sys.stdout, sys.stderr)
File "mypy/main.py", line 87, in main
File "mypy/main.py", line 165, in run_build
File "mypy/build.py", line 179, in build
File "mypy/build.py", line 254, in _build
File "mypy/build.py", line 2697, in dispatch
File "mypy/build.py", line 3021, in process_graph
File "mypy/build.py", line 3138, in process_stale_scc
File "mypy/build.py", line 2288, in write_cache
File "mypy/build.py", line 1475, in write_cache
File "mypy/nodes.py", line 313, in serialize
File "mypy/nodes.py", line 3149, in serialize
File "mypy/nodes.py", line 3083, in serialize
AssertionError: Definition of alembic.runtime.migration.EnvironmentContext is unexpectedly incomplete
Note it might be a mypy bug (since this is an AssertionError), but I think this looks related to some weirdness in alembic typing code.
Describe the bug
Using mypy with
--no-implicit-reexport(which is part of--strict) generate a failure since alembic 1.7Expected behavior
No AssertionError
To Reproduce
Versions.
Note it might be a mypy bug (since this is an AssertionError), but I think this looks related to some weirdness in alembic typing code.
Thanks!