pylint ignored-classes in source file

女生的网名这么多〃 提交于 2019-12-24 01:19:51

问题


In pylint, I can put in my source code:

# pylint: disable=no-member

But, I really want to disable this warning against certain classes, in particular my google protobuf classes, and zmq objects. Answers on this site suggest to ignore class as a compiler option:

pylint --ignored-classes=some_class_name my_python_file.py

You can also place this option in your pylintrc file. I don't want to do either. I'd rather stick the option within the source file. I get a complaint if I do the following:

# (Does not work)
# pylint: ignored-classes=some_class_name

Is there anyway to specify this option inside the source file that references the classes I want to ignore? Thanks.

来源:https://stackoverflow.com/questions/50767469/pylint-ignored-classes-in-source-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!