当前位置: 首页 > 工具软件 > Pylint > 使用案例 >

Pylint同时屏蔽多个报错信息

海灵均
2023-12-01

同时禁用多个告警信息时,这多个告警信息之间用,分割,实例如:

# pylint: disable=too-many-return-statements,too-many-branches

pylint --generate-rcfile shows it like this:

[MESSAGES CONTROL]

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time.
#enable=

# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once).
#disable=
 类似资料: