How to prevent python pylint complaining about socket class sendall method

后端 未结 2 1503
有刺的猬
有刺的猬 2021-02-20 18:08

I have a bit of code using a simple tcp socket setup to test something. We run pylint --errors-only on our python files, generally as a way to validate all our code

2条回答
  •  时光取名叫无心
    2021-02-20 18:49

    You can use pylint --errors-only --ignored-classes=_socketobject or add

    [TYPECHECK]
    ignored-classes=SQLObject,_socketobject
    

    to your ~/.pylintrc file.

    From the documenation,

    ignored-classes:

    List of classes names for which member attributes should not be checked (useful for classes with attributes dynamically set).

    Default: SQLObject

提交回复
热议问题