admin管理员组文章数量:1320661
I am working on a library package that depends on some other libraries and I statically type checking my code.
When running mypy (version 1.14.0) the first time on a freshly created enviroment, mypy finds the external libraries (for example peewee) and installs automatically the types-stubs from typeshed. But it does not install types-seaborn. So far this is the one and only exception to the rule.
If I install it manually with:
pip install types-seaborn
then mypy runs without any problem.
As a workaround I have explicitly added the types-seaborn dependency to the pyproject.toml file, but I would have preferred the automatic behavior.
Do you know why this is happening and how can I fix it?
I am working on a library package that depends on some other libraries and I statically type checking my code.
When running mypy (version 1.14.0) the first time on a freshly created enviroment, mypy finds the external libraries (for example peewee) and installs automatically the types-stubs from typeshed. But it does not install types-seaborn. So far this is the one and only exception to the rule.
If I install it manually with:
pip install types-seaborn
then mypy runs without any problem.
As a workaround I have explicitly added the types-seaborn dependency to the pyproject.toml file, but I would have preferred the automatic behavior.
Do you know why this is happening and how can I fix it?
Share Improve this question asked Jan 18 at 16:40 totototo 3624 silver badges13 bronze badges 7- Similar issue as stackoverflow/questions/60247157/… ? – rehaqds Commented Jan 18 at 17:26
- it is indeed similar, but while for pandas and numpy, mypy is able to find the type stubs, for seaborn not. – toto Commented Jan 18 at 17:46
- What is your python version? – rehaqds Commented Jan 18 at 18:09
- Python 3.12, mypy 1.14.0, both in Linux and Windows – toto Commented Jan 18 at 19:24
- what error or warning do you get from mypy when you use seaborn? – rehaqds Commented Jan 18 at 20:33
1 Answer
Reset to default 2This was a bug in mypy
, reported by OP in #18485 and fixed on master a bit earlier in #18366. Last affected version is 1.14.1, this should work as expected with the next release (or use pip install git+https://github/python/mypy
now to use the master version).
本文标签: pythonmypy does not install typesseaborn automaticallyStack Overflow
版权声明:本文标题:python - mypy does not install types-seaborn automatically - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742064045a2418726.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论