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-plugins=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
pylint-protobuf-0.12.tar.gz
(8.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pylint-protobuf-0.12.tar.gz.
File metadata
- Download URL: pylint-protobuf-0.12.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be02c6858b28e768dd1d69166500b368f4068dbd5958470d75e8633d872e3397
|
|
| MD5 |
66143289954824adce20d939a06b08b9
|
|
| BLAKE2b-256 |
bcce47ccd469a0b550da7d160c00891611f84e1320631c1d12ba78a323219f28
|
File details
Details for the file pylint_protobuf-0.12-py2.py3-none-any.whl.
File metadata
- Download URL: pylint_protobuf-0.12-py2.py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc9039a844c48b881ea1764bbdd87f0e146742fead4dda24b8441b8971a7e470
|
|
| MD5 |
7d5f24b4ca231a9931c98a9769829bc0
|
|
| BLAKE2b-256 |
990c35221b6c13249e07e594cd3704dcc22fe7cb210f0c7f29591bac5f08bb6e
|