
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
A plugin for making Pylint aware of the fields of protobuf-generated classes
pylint-protobuf
is a Pylint plugin for making Pylint aware of generated
fields from Protobuf types.
Install from PyPI via:
pip install pylint-protobuf
Add or update pylintrc
to load pylint-protobuf
:
[MASTER]
load-plugins=pylint_protobuf
$ cat <<EOF >person.proto
message Person {
required string name = 1;
}
EOF
$ protoc person.proto --python_out=.
$ cat <<EOF >readme.py
from person_pb2 import Person
p = Person('all arguments must be kwargs')
p.invalid_field = 'value'
p.name = 123
EOF
$ pip install pylint-protobuf
$ pylint --load-plugins=pylint_protobuf readme.py
************* Module readme
readme.py:2:4: E5904: Positional arguments are not allowed in message constructors and will raise TypeError (protobuf-no-posargs)
readme.py:3:0: E5901: Field 'invalid_field' does not appear in the declared fields of protobuf-generated class 'Person' and will raise AttributeError on access (protobuf-undefined-attribute)
readme.py:4:0: E5903: Field "Person.name" is of type 'str' and value 123 will raise TypeError at runtime (protobuf-type-error)
pylint-protobuf
supports Python 3.8 at a minimum.
pylint-protobuf
does not currently support the following concepts:
A protoc
compiler plugin for generating .pyi
stubs from .proto
files.
Fully-featured and well supported, a useful extension to a mypy
workflow.
May be better suited to your usecase if you control the entire pipeline. May
not be suited if you are a downstream consumer of generated _pb2.py
modules
with no access to the original .proto
definitions, in which case
pylint-protobuf
may be better suited for your use.
FAQs
A plugin for making Pylint aware of the fields of protobuf-generated classes
We found that pylint-protobuf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.