vscode-settings - 使用 Python2 和 Python3 为项目设置 vscode MyPy
问题描述
我有一个基于 vscode linux 的项目,主要是Python2.7。该项目早在 Python3 出现势头之前就开始了。
在 vscode 设置中,我必须指定代码用于 python2。
"python.linting.mypyArgs": [ "--py2" ],
现在,我必须添加一些用Python3编写的新代码/模块/包。
我可以将 vscode mypy 配置为对某些文件/目录使用 Python3 linting,对其他文件/目录使用 Python2 linting 吗?如果是这样,怎么做?
解决方案
推荐阅读
- python - 将具有样式格式的熊猫框架导出到excel文件中?
- jquery - 使用jquery过滤具有多个数据属性的元素
- sql - 查询更新中的案例
- php - 搜索名称/产品/等时如何从 MySQLI 数据库中检索图像
- postgresql - 如何使用 JDBC 加速从 PostgreSQL 的批量读取?
- javascript - 如何在javascript中访问另一个对象中的嵌套对象
- angular - 将地图对象(具有动态键和值)渲染为角度垫表(列和行作为地图的键和值)
- django - 如何在 Django 中创建在凌晨 12:00 执行特定功能的触发器
- vue.js - onChange 事件不适用于 `vue-select` npm 包
- visual-studio - 如何在 Visual Studio 中将 varchar 转换为数字?