选择性忽略的心理_选择性忽略是什么意思

选择性忽略的心理_选择性忽略是什么意思Python:PyCharm选择性忽略PEP8警告PyCharm是个很强大的pythonIDE,PEP8的告警提示也很好用,但是函数名不能包含大写字母等少数几个规范真心觉得不好,如何取消呢?见下述步骤:在Ignorederrors中添加要忽略的告警ID。注意,要区分是属于coding还是naming。错误代码code samplemessage N801 classnamesshoulduseCapWordsconvention N8

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

Python:PyCharm选择性忽略PEP8警告

PyCharm 是个很强大的 python IDE,PEP 8 的告警提示也很好用,但是函数名不能包含大写字母等少数几个规范真心觉得不好,如何取消呢?见下述步骤:

选择性忽略的心理_选择性忽略是什么意思

在 Ignored errors 中添加要忽略的告警ID。注意,要区分是属于 coding 还是 naming。

错误代码

code sample message
N801 class names should use CapWords convention
N802 function name should be lowercase
N803 argument name should be lowercase
N804 first argument of a classmethod should be named ‘cls’
N805 first argument of a method should be named ‘self’
N806 variable in function should be lowercase
N807 function name should not start and end with ‘__’
N811 constant imported as non constant
N812 lowercase imported as non lowercase
N813 camelcase imported as lowercase
N814 camelcase imported as constant
N815 mixedCase variable in class scope
N816 mixedCase variable in global scope
N817 camelcase imported as acronym
code sample message
E1 Indentation
E101 indentation contains mixed spaces and tabs
E111 indentation is not a multiple of four
E112 expected an indented block
E113 unexpected indentation
E114 indentation is not a multiple of four (comment)
E115 expected an indented block (comment)
E116 unexpected indentation (comment)
E117 over-indented
E121 (*^) continuation line under-indented for hanging indent
E122 (^) continuation line missing indentation or outdented
E123 (*) closing bracket does not match indentation of opening bracket’s line
E124 (^) closing bracket does not match visual indentation
E125 (^) continuation line with same indent as next logical line
E126 (*^) continuation line over-indented for hanging indent
E127 (^) continuation line over-indented for visual indent
E128 (^) continuation line under-indented for visual indent
E129 (^) visually indented line with same indent as next logical line
E131 (^) continuation line unaligned for hanging indent
E133 (*) closing bracket is missing indentation
   
E2 Whitespace
E201 whitespace after ‘(‘
E202 whitespace before ‘)’
E203 whitespace before ‘:’
   
E211 whitespace before ‘(‘
   
E221 multiple spaces before operator
E222 multiple spaces after operator
E223 tab before operator
E224 tab after operator
E225 missing whitespace around operator
E226 (*) missing whitespace around arithmetic operator
E227 missing whitespace around bitwise or shift operator
E228 missing whitespace around modulo operator
   
E231 missing whitespace after ‘,’, ‘;’, or ‘:’
   
E241 (*) multiple spaces after ‘,’
E242 (*) tab after ‘,’
   
E251 unexpected spaces around keyword / parameter equals
   
E261 at least two spaces before inline comment
E262 inline comment should start with ‘# ‘
E265 block comment should start with ‘# ‘
E266 too many leading ‘#’ for block comment
   
E271 multiple spaces after keyword
E272 multiple spaces before keyword
E273 tab after keyword
E274 tab before keyword
E275 missing whitespace after keyword
   
E3 Blank line
E301 expected 1 blank line, found 0
E302 expected 2 blank lines, found 0
E303 too many blank lines (3)
E304 blank lines found after function decorator
E305 expected 2 blank lines after end of function or class
E306 expected 1 blank line before a nested definition
   
E4 Import
E401 multiple imports on one line
E402 module level import not at top of file
   
E5 Line length
E501 (^) line too long (82 > 79 characters)
E502 the backslash is redundant between brackets
   
E7 Statement
E701 multiple statements on one line (colon)
E702 multiple statements on one line (semicolon)
E703 statement ends with a semicolon
E704 (*) multiple statements on one line (def)
E711 (^) comparison to None should be ‘if cond is None:’
E712 (^) comparison to True should be ‘if cond is True:’ or ‘if cond:’
E713 test for membership should be ‘not in’
E714 test for object identity should be ‘is not’
E721 (^) do not compare types, use ‘isinstance()’
E722 do not use bare except, specify exception instead
E731 do not assign a lambda expression, use a def
E741 do not use variables named ‘l’, ‘O’, or ‘I’
E742 do not define classes named ‘l’, ‘O’, or ‘I’
E743 do not define functions named ‘l’, ‘O’, or ‘I’
   
E9 Runtime
E901 SyntaxError or IndentationError
E902 IOError
   
W1 Indentation warning
W191 indentation contains tabs
   
W2 Whitespace warning
W291 trailing whitespace
W292 no newline at end of file
W293 blank line contains whitespace
   
W3 Blank line warning
W391 blank line at end of file
   
W5 Line break warning
W503 (*) line break before binary operator
W504 (*) line break after binary operator
W505 (*^) doc line too long (82 > 79 characters)
   
W6 Deprecation warning
W601 .has_key() is deprecated, use ‘in’
W602 deprecated form of raising exception
W603 ‘<>’ is deprecated, use ‘!=’
W604 backticks are deprecated, use ‘repr()’
W605 invalid escape sequence ‘x’
W606 ‘async’ and ‘await’ are reserved keywords starting with Python 3.7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/174329.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 黑马vue电商后台管理系统总结[通俗易懂]

    黑马vue电商后台管理系统总结[通俗易懂]vue电商后台管理系统-阶段总结一、项目技术栈前端前端采用vuecli脚手架搭建框架,使用elementUI美化项目结构环境依赖(开发依赖,运行依赖)富文本编辑器nprogress加载进度条echarts图表展示第三方http库axios后端后端是已经写好了的,采用express搭建的API服务,返回的数据是JSON格式的数据,只需要导入数据库,并配置一下数据库信息,就可以跑起来了,也有对应的api文档数据库数据库采用MySQL5.7

    2022年6月12日
    60
  • c++入门教程–-7嵌套循环

    c++入门教程–-7嵌套循环

    2021年3月12日
    156
  • HashMap 底层实现原理

    HashMap 底层实现原理要了解 HashMap 的底层实现原理 我们首先要对 HashMap 的部分底层源码进行分析 publicclassH K V extendsAbstr K V implementsMa K V Cloneable Serializable 我们可以看出 HashMap 继承了 AbstractMap 实现了 Map Cloneable Serializable 接口 staticfinali I K V K V K V

    2025年6月30日
    3
  • python对csv文件的读写

    python对csv文件的读写首先先简单说一下csv文件,csv的全称是Comma-SeparatedValues,意思是逗号分隔值,通俗点说就是一组用逗号分隔的数据。CSV文件可以用excel打开,会显示如下图所示:这个文件用notepad打开显示是这样的,这是它原始的样子:好了,下班我们来用python对csv文件进行读写操作1.读文件如何用Python像操作Excel一样提取其中的一列,即一个字段,利用Py…

    2022年7月21日
    17
  • 一文弄懂什么是Precision,Recall,F1score,以及accuracy[通俗易懂]

    一文弄懂什么是Precision,Recall,F1score,以及accuracy[通俗易懂]近期在做实验的时候一直出现Precision,Recall,F1score,以及accuracy这几个概念,为了防止混淆,在这里写下学习笔记,方便以后复习。以一个二分类问题为例,样本有正负两个类别。那么模型预测的结果和真实标签的组合就有4种:TP,FP,FN,TN,如下图所示。TP实际为正样本你预测为正样本,FN实际为正样本你预测为负样本,FP实际为负样本你预测为正样本,TN实际为负样本…

    2022年10月14日
    1
  • 虚拟机连接上网的步骤「建议收藏」

    虚拟机连接上网的步骤「建议收藏」1.首先查看本机的可上网的IP地址:我的本机IP地址是192.168.1.5,由此可以推出我的网关地址就是192.168.1.1这个网关就是可以用来访问的一个地址,一般子网掩码都是255.255.255.02.设置本机的Vmare8的IP为静态IP和并且一定要配到这个192.168.1.1这个网关下右键其属性配成对用的网关地址,一定要在一个网段内下面是虚拟机里面的配置,里面有个虚拟机网络编辑这个是可供虚拟机上网的网段,一定要在这个范围之内这个配置完之后

    2022年5月19日
    72

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号