Is it possible to ignore one single specific line with pylint?

前端 未结 4 869
生来不讨喜
生来不讨喜 2020-11-29 00:39

I have the following line in my header:

import config.logging_settings

This actually changes my python logging settings, but pylint thinks

4条回答
  •  盖世英雄少女心
    2020-11-29 01:29

    import config.logging_settings # pylint: disable=W0611
    

    That was simple and is specific for that line.

    As sthenault kindly pointed out, you can and should use the more readable form:

    import config.logging_settings # pylint: disable=unused-import
    

提交回复
热议问题