问题
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