How do I disable “TODO” warnings in pylint?

后端 未结 3 609
一生所求
一生所求 2021-02-18 20:50

When running pylint on a python file it shows me warnings regarding TODO comments by default. E.g.:

************* Module foo
W:200, 0: TODO(SE): fi

3条回答
  •  温柔的废话
    2021-02-18 21:12

    Along with the solution posted by @sthenault where you could disable all warnings, Pylint also allows you to ignore a single line (helpful if you would want to deal with it in the future) like so:

    A_CONSTANT = 'ugh.'  # TODO: update value  # pylint: disable=fixme
    

    or by stating the Rule ID:

    A_CONSTANT = 'ugh.'  # TODO: update value  # pylint: disable=W0511
    

提交回复
热议问题