-
Notifications
You must be signed in to change notification settings - Fork 160
asyncssh causes mypy to crash #542
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
It looks like you are running into python/mypy#14631. There's a fix available in mypy for this, but I'm not sure it has made it into a mypy release yet. |
The code in AsyncSSH that triggers this internal error was causing other problems, so I added a workaround in commit 0d49161, which seems to avoid the error for me. |
In the project in which it failed me, changing the dependency to the one of the commit that you indicate me, mypy no longer fails. So in my case it is also solved! Thanks a lot!!! P.S. When will this correction be released to pypi? |
Great! Thanks for letting me know... I'll try to put out a bug fix release of AsyncSSH with this change in the next few days. |
This is now released in AsyncSSH 2.13.1. |
Tested with the new version and it works, so the matter is finished. 👍 |
Thanks for the confirmation! |
As soon as I install asyncssh and run mypy I get the following error:
Generated HTML report (via XSLT): C:\Users\jcmencia\PycharmProjects\test\reports\typing\index.html
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\jcmencia\PycharmProjects\test\venv\Scripts\mypy.exe_main.py", line 7, in
File "C:\Users\jcmencia\PycharmProjects\test\venv\Lib\site-packages\mypy_main.py", line 15, in console_entry
main()
File "mypy\main.py", line 95, in main
File "mypy\main.py", line 174, in run_build
File "mypy\build.py", line 194, in build
File "mypy\build.py", line 277, in _build
File "mypy\build.py", line 2923, in dispatch
File "mypy\build.py", line 3320, in process_graph
File "mypy\build.py", line 3443, in process_stale_scc
File "mypy\build.py", line 2504, in write_cache
File "mypy\build.py", line 1574, in write_cache
File "mypy\nodes.py", line 377, in serialize
File "mypy\nodes.py", line 3841, in serialize
File "mypy\nodes.py", line 3778, in serialize
File "mypy\nodes.py", line 3514, in serialize
File "mypy\types.py", line 2072, in serialize
File "mypy\types.py", line 605, in serialize
File "mypy\types.py", line 2876, in serialize
AssertionError: Internal error: unresolved placeholder type None
Mypy Configuration
mypy -> 1.0.0
[tool.mypy]
html_report = "reports/typing"
junit_xml = "reports/typing/junit.xml"
files = "src, tests"
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
disallow_untyped_calls = true
disallow_subclassing_any = true
check_untyped_defs = true
no_implicit_optional = true
show_error_codes = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
warn_unreachable = true
strict_equality = true
strict_concatenate = true
plugins = ["pydantic.mypy"]
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
Edit
mypy src
also happens.The text was updated successfully, but these errors were encountered: