标签:pylint
-
从pylint了解“太多祖先” - python
example.py: ''' demo too many ancestors ''' from flask_security.forms import RegisterForm from wtforms.fields import TextField class ExtendedRegisterF […]
-
Python全局关键字与Pylint W0603 - python
Pylint W0603指出: 使用全局语句。当您使用“全局”语句来 更新全局变量。 PyLint只是试图阻止这种用法。 那并不意味着您不能使用它! 我不知道为什么会这样吗?还有其他Pythonic方式可以修改函数内部不可变的模块级变量吗?是否建议将它们打包在诸如字典之类的可变变量中?或者也许将整个模块变成课堂? 我认为,当建议变量为“私有”(以_或__开头 […]
-
皮林特警告“无用的超级代表团” - python
Pylint发出警告:下面的Useless super delegation in method '__init__' (useless-super-delegation)类为SpecificError。 class MyProjectExceptions(Exception): """The base cl […]
-
如何在Visual Studio代码中配置pylint以在项目目录中搜索模块 - python
在Visual Studio代码中,我得到了错误: [pylint]无法从Controllers.InterferenceGraph导入 代码行是 from Controllers.InterferenceGraph import InterferenceGraph 文件InterferenceGraph.py与出现错误的行位于同一目录中。如何配置pyl […]
-
Docker开发环境中,pylint无法导入错误 - python
我有一个问题,我一直在为django 2.0项目使用docker环境,而pylint工作正常,但现在显示无法导入模块错误。我知道导入错误问题已被问过很多次,但它始终是针对venv设置而不是docker环境设置。 我不确定是什么导致了错误,但是可能是因为我删除了旧的容器,卷,图像并从头开始。 我在Manjaro Linux上使用Python 3和VSCode。 […]
-
如何提示程序员在python中使用tryexcept子句? - python
假设我有一个引发异常的methodA: def methodA(x, y): if y != 0: z = x / y return z else: raise ZeroDivisionError("zero can not be a denominator") 在methodB中,我不处理异常就调用了methodA: def methodB […]