mypy ---- Python typing checker
文章目录
missing types or stubs not installed
解决办法
- mypy –install-types tests
- mypy –install-types -c 'import tests'
参考
pyproject.toml 配置文件
参考
例子
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23# mypy global options: [tool.mypy] python_version = "2.7" warn_return_any = true warn_unused_configs = true # mypy per-module options: [[tool.mypy.overrides]] module = ["mycode.foo.*", "module2", "module3", ...] disallow_untyped_defs = true [[tool.mypy.overrides]] module = "mycode.bar" warn_return_any = false [[tool.mypy.overrides]] module = [ "somelibrary", "some_other_library" ] ignore_missing_imports = true
初次启动慢
- 正常现象
stubs
pandas
1 2 3poetry add data-science-types -D pip install data-science-types mamba install data-science-types
文章作者
上次更新 2022-03-03 (5c64003)