-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
IndexError: list index out of range #16674
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
Any chance you can make a shareable repro? E.g. try removing stuff from the file until you get something small enough to redact that mypy still crashes on. Also worth checking if the crash reproduces without the sqlalchemy plugin. |
I spent a couple hours trying to reproduce this but was struggling. I think it does have something to do with the sqlalchemy plugin. If I remove |
What if you keep |
Adding another config example, as we're running into this too while trying to upgrade to 3.11. We're trying 1.8 and also 1.7 to see if it works, but no dice.
[mypy]
# We cannot use the pydantic.mypy plugin yet as it is not compatible with mypy 0.910
plugins = loguru_mypy, sqlalchemy.ext.mypy.plugin
exclude = alembic/versions/
follow_imports = normal
check_untyped_defs = True
disallow_incomplete_defs = True
disallow_untyped_defs = True
namespace_packages = True
warn_unused_ignores = True
show_error_codes = True
local_partial_types = True |
It seems like this might be specific to |
this might be already filed with sqlalchemy here sqlalchemy/sqlalchemy#10282 |
(yes, that one is newer but comes with a reproducer!) |
Crash Report
Mypy crashes when run on a python repo with
mypy .
Traceback
To Reproduce
Run
mypy .
on our private repo. It seems to fail on a particular python file giving-1
as the line number.Your Environment
mypy.ini
(and other config files):The text was updated successfully, but these errors were encountered: