PyLint 坏空白配置 [英] PyLint bad-whitespace Configuration

查看:43
本文介绍了PyLint 坏空白配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法为 PyLint 中的 bad-whitespace 检查配置检查?我目前可以禁用检查,但我更愿意强制执行空格约定而不是禁用它.

Is there a way to configure the checks for the bad-whitespace checks in PyLint? I can currently disable checking but I would much rather enforce a whitespace convention instead of disabling it.

推荐答案

您可以使用两个选项:

  1. 全局禁用坏空格警告:

  1. Globally disable the bad-whitespace warning:

pylint --disable=C0326

  • 使用 Pylint 配置文件:

  • Use a Pylint configuration file:

    pylint --rcfile=/path/to/config.file
    

    这是您将放在配置文件中以禁用错误空白警告的内容:

    This is what you would put in the config file to disable the bad-whitespace warning:

    disable=C0326
    

  • 这篇关于PyLint 坏空白配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆