python – Pylint无效的函数名称
我用 Python 3.6.2运行Pylint 1.7.2. Pylint显示以下错误: Invalid function name "create_maximization_option_dataframe" (invalid-name) 我在我的代码中定义了一个类似的函数: def create_maximization_option_dataframe(file_name): PEP8风格指南基本上只是说:
据我所知,我正在遵循函数名称的所有格式规则. Pylint是否有一些我不知道的内置最大函数名称长度规则?我可以很容易地忽略Pylint错误,但我想先了解为什么会这样. 解决方法通过pylint pylint –generate-rcfile创建配置文件.这个范围取决于你把它放在哪里.引用 https://docs.pylint.org/en/1.6.0/run.html>当前工作目录中的pylintrc 听起来你需要选项5或6. 在pylintrc中,找到这个位 # Regular expression matching correct function names function-rgx=[a-z_][a-z0-9_]{2,30}$ 将那个30接近结束改为40左右. (编辑:鄂州站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- python – 将数字字符引用表示法转换为unicode字
- python – 根据上一个和下一个元素将元素插入到列
- python – 逐行文件处理,for-loop vs with
- Python – 从作为另一个元素的子串的字符串列表中
- python – 如何在mac中安装setuptools
- python – matplotlib.pyplot.imshow:在使用属性
- python – Numpy.dot()维度未对齐
- python – OSError:[WinError87]参数不正确
- python – Pandas isna()和isnull(),有什么区别?
- python – 如何使用输入函数和def函数?