-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Semantic analysis deferral crash #11064
Comments
I can repro; thank you for taking the time to make a great bug report! |
I guess it is showing an error due to cyclic importing? What is the expected behavior, that mypy should detect such cycles on execution? |
Any remediations would be welcome in the mean time. I haven't been able to exclude my way out of the error or by changing import following. |
Ok, I'll read up on it. Again, I'm new to contributing and the mypy repository. I'll do what I can! |
On testing this on my local system, I could reproduce the issue. However, on simply compiling the script test1.py, it stated that it could't find 'aaaa'. I simply added a function aaaa that printed "aaaa" in test1.py and now even the
Maybe this wasn't intended? Or it was required that mypy print a different error message on the absence of a function 'aaaa'? Please guide me on this guys @jrabbit @hauntsaninja @hi-ogawa |
Hi everyone, I just got back to my draf PR #11346 after quite some time, and indeed OP's example seems to fixed already on current master. But I found there are some similar cyclic import examples where it leads to crash, so I reopend my PR with some description updated. I would appreciate if someone could review it. Thanks a lot! |
OP's example does not look fixed on current master to me, but does seem fixed with your PR :-) |
Fixes #11064. Co-authored by @hi-ogawa Pushes #11346 over the finish line. Implements the suggestion in #11346 (review) Co-authored-by: Hiroshi Ogawa <hi.ogawa.zz@gmail.com> Co-authored-by: hauntsaninja <>
Fixes python#11064. Co-authored by @hi-ogawa Pushes python#11346 over the finish line. Implements the suggestion in python#11346 (review) Co-authored-by: Hiroshi Ogawa <hi.ogawa.zz@gmail.com> Co-authored-by: hauntsaninja <>
Crash Report
Mypy crashes with code at https://github.com/atsuoishimoto/mypy_issue.
Traceback
To Reproduce
Run
mypy .
atsrc
directory below.Test code can be cloned from https://github.com/atsuoishimoto/mypy_issue.
Directory structure
test1.py
dir1/__init__.py
dir1/test2.py
Your Environment
mypy .
mypy.ini
(and other config files): NoneThe text was updated successfully, but these errors were encountered: