A plugin for making Pylint aware of the fields of protobuf-generated classes
Project description
pylint-protobuf
pylint-protobuf
is a Pylint plugin for making Pylint aware of generated
fields from Protobuf types.
Usage
$ cat <<EOF >person.proto
message Person {
required string name = 1;
required int32 id = 2;
optional string email = 3;
}
EOF
$ cat <<EOF >example.py
from person_pb2 import Person
a = Person()
a.invalid_field = 123
EOF
$ protoc person.proto --python_out=.
$ pip install pylint-protobuf
$ pylint --load-plugin=pylint_protobuf example.py
************* 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
(protobuf-undefined-attribute)
------------------------------------
Your code has been rated at -6.67/10
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pylint-protobuf-0.11.dev1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74e17a032431158580d052015560fa731c15a47869ce94907004f07f82f6e0d2 |
|
MD5 | e19a12fae8abdb08aad9dbcae8437cf5 |
|
BLAKE2b-256 | 64ed51e3d691775af442a34321db18403f60ec761faf9fdbf18395241daa1670 |
Close
Hashes for pylint_protobuf-0.11.dev1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c595b3e2456a47ab45e818b06c79bd4cab699f53bb764f918d967ca320ac6a4 |
|
MD5 | e766a500e9561860d94f565d16d72dae |
|
BLAKE2b-256 | fe7f0d38068ebd4753f7a09583568921cf00376bf8afb80497b5a8afa7f41be5 |