美文网首页
代码爆红Cannot find declaration to g

代码爆红Cannot find declaration to g

作者: 创造new_world | 来源:发表于2020-03-25 21:42 被阅读0次

有时候代码会爆红,其实解决好解决,用绝对路径就行,但是我想说的是不一定爆红就是因为有问题,懂不?可能用了绝对路径会影响开发

直接说解决方法:

想跳转到函数声明或定义的时候,出现“Cannot find declaration to goto”

from common.business import apiHeader

我在py文件A里想调用common文件夹下的business方法。虽然文件A和common在同一个文件夹,会报错,

所以我引入的时候,从跟目录引入,如下

from pyunit.common.business import apiHeader

问题背景:

我复制了一个项目,想要跳转转到函数声明或定义的时候,出现“Cannot find declaration to goto”

相关文章

网友评论

      本文标题:代码爆红Cannot find declaration to g

      本文链接:https://www.haomeiwen.com/subject/kokfuhtx.html