Pylint and protobuff


I try to find a solution to use pylint on my project which use protobuf.
I find many solutions to fix trouble but the problem still there when I do a lvalue from a variable in protobuf message.

In Pycharm when I use IDE pylint, it seems there is no trouble and even a lvalue doesn’t generate a no member error.

Is there a way to know how the pylint command is used in pycharm?

Best regards

Hi - Welcome in this forum. I assume you’re having trouble with the files that are auto-generated?
Have you tried for instance using “pylint-protobuf”?
The simplest solution for the problem would be to declare it’s not a problem and skip all automatically generated files when running pylint. Would that not be acceptable?

Indeed I already tried “pylint-protobuf”.

In my case that would not be an acceptable solution because I do want to check if a no member warning happend event on protobuf variable.

How to execute the same command as the PycharmIDE ? Because in Pycharm, it works properly but I can’t do it in gitlab CI

Unfortunately I don’t know anything about PyCharm. If you are stuck, you could also ask the PyCharm support (demand some real value for your money)? :slight_smile:

In fact, I don’t want to use Pycharm for linting job. I think it is possible to do the same with pylint.

Here is the command I use to generate my proto and use pylint

protoc   --python_out=. --mypy_out=. --proto_path=$DIR **/*.proto
fix-protobuf-imports .
pylint -E  --load-plugins=pylint_protobuf