Skip to main content

A plugin for making Pylint aware of the fields of protobuf-generated classes

Project description


pylint-protobuf is a Pylint plugin for making Pylint aware of generated fields from Protobuf types.


$ cat <<EOF >person.proto
message Person {
  required string name = 1;
  required int32 id = 2;
  optional string email = 3;
$ cat <<EOF >
from person_pb2 import Person
a = Person()
a.invalid_field = 123
$ protoc person.proto --python_out=.
$ pip install pylint-protobuf
$ pylint --load-plugins=pylint_protobuf
************* Module example
E:  4, 0: Field 'invalid_field' does not appear in the declared fields of
protobuf-generated class 'Person' and will raise AttributeError on access

Your code has been rated at -6.67/10

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pylint-protobuf, version 0.13
Filename, size File type Python version Upload date Hashes
Filename, size pylint_protobuf-0.13-py2.py3-none-any.whl (14.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size pylint-protobuf-0.13.tar.gz (10.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page