我正在VSCode中运行一个Django应用程序,使用pylint,并且没有显示相关的导入错误。在我安装更新版本的VSCode之前。你知道吗
我尝试过更改用户设置和工作区设置,但仍然无法显示错误。你知道吗
用户设置
{
"window.zoomLevel": 1,
"explorer.confirmDelete": false,
"workbench.startupEditor": "newUntitledFile",
"window.menuBarVisibility": "default",
"explorer.confirmDragAndDrop": false,
"workbench.colorTheme": "Visual Studio Dark",
"update.enableWindowsBackgroundUpdates": false,
"update.channel": "none",
"php.validate.run": "onSave",
}
工作区设置
{
"python.linting.enabled": true,
"python.linting.pep8Enabled": false,
"python.linting.pylintArgs": ["--load-plugins", "pylint_django"],
"python.linting.pylintEnabled": true,
"python.pythonPath": "/home/justin/anaconda3/bin/python",
"python.linting.pylintPath": "/home/justin/anaconda3/bin/pylint"
}
在我的一个函数的顶部,有几个不同的相对导入。哪一个是对的还是错的,VSCode应该告诉我。两个导入都在Django的同一个项目目录中,因此导入应该是一个“.”我相信。你知道吗
from .performance import get_perf_dates, get_perf_data
from ..models import DistributionList, Legend
目前没有回答
相关问题 更多 >
编程相关推荐