1.问题描述:不能导入自定义类
错误内容:This inspection detects names that should resolve but don't. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Top-level and class-level items are supported better than instance items
截图:(count.py文件不能导入在相同路径下的pub.py的方法)
解决方法1:将导入部分写成:from WebTest.project.pub import add (将路径明确写入)
解决方法2:进入:File—setting—Bulidout,Excution,Deployment—Console—Python Console 如下图操作
之后右击项目,如下图操作