gpt4 book ai didi

python - 为什么默认的 pylintrc 有这么多禁用消息?

转载 作者:行者123 更新时间:2023-11-28 22:12:14 24 4
gpt4 key购买 nike

如果您运行 pylint --generate-rcfile > pylintrc 并查看默认的 rc 文件,您将看到以下禁用警告列表。

为什么默认情况下禁用它们?

disable=print-statement,
parameter-unpacking,
unpacking-in-except,
old-raise-syntax,
backtick,
long-suffix,
old-ne-operator,
old-octal-literal,
import-star-module-level,
non-ascii-bytes-literal,
raw-checker-failed,
bad-inline-option,
locally-disabled,
locally-enabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
apply-builtin,
basestring-builtin,
buffer-builtin,
cmp-builtin,
coerce-builtin,
execfile-builtin,
file-builtin,
long-builtin,
raw_input-builtin,
reduce-builtin,
standarderror-builtin,
unicode-builtin,
xrange-builtin,
coerce-method,
delslice-method,
getslice-method,
setslice-method,
no-absolute-import,
old-division,
dict-iter-method,
dict-view-method,
next-method-called,
metaclass-assignment,
indexing-exception,
raising-string,
reload-builtin,
oct-method,
hex-method,
nonzero-method,
cmp-method,
input-builtin,
round-builtin,
intern-builtin,
unichr-builtin,
map-builtin-not-iterating,
zip-builtin-not-iterating,
range-builtin-not-iterating,
filter-builtin-not-iterating,
using-cmp-argument,
eq-without-hash,
div-method,
idiv-method,
rdiv-method,
exception-message-attribute,
invalid-str-codec,
sys-max-int,
bad-python3-import,
deprecated-string-function,
deprecated-str-translate-call,
deprecated-itertools-function,
deprecated-types-field,
next-method-defined,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating

最佳答案

From the documentation's Frequently Asked Questions...

Why are there a bunch of messages disabled by default?

pylint does have some messages disabled by default, either because they are prone to false positives or that they are opinionated enough for not being included as default messages. But most of the disabled messages are from the Python 3 porting checker, which is disabled by default. It needs special activation with the --py3k flag.

关于python - 为什么默认的 pylintrc 有这么多禁用消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55031339/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com