{"id":24350,"library":"pylint-protobuf","title":"pylint-protobuf","description":"A Pylint plugin that makes Pylint aware of the fields of protobuf-generated classes, preventing false positives like 'no-member' when accessing protobuf message attributes. Current version: 0.22.0. Released periodically, with the last release in 2021.","status":"maintenance","version":"0.22.0","language":"python","source_language":"en","source_url":"https://github.com/nelfin/pylint-protobuf","tags":["pylint","protobuf","linter","plugin","static-analysis"],"install":[{"cmd":"pip install pylint-protobuf","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required runtime dependency; the plugin extends Pylint.","package":"pylint","optional":false},{"reason":"Required to analyse protobuf-generated classes.","package":"protobuf","optional":false}],"imports":[{"note":"Plugin auto-registers when loaded; manual registration not needed for basic use.","symbol":"register_protobuf_visitors","correct":"from pylint_protobuf import register_protobuf_visitors"}],"quickstart":{"code":"# Write a .pylintrc or pyproject.toml with:\n# [MASTER]\n# load-plugins=pylint_protobuf\n#\n# Then run pylint on your project.\n# Example of usage without config file:\nimport os\nos.system('pylint --load-plugins=pylint_protobuf my_module.py')","lang":"python","description":"Load the plugin via Pylint's --load-plugins flag or config file to eliminate false positives on protobuf fields."},"warnings":[{"fix":"Ensure that your protobuf compilation includes --descriptor_set_out and that the generated descriptor files are deployed alongside the code.","message":"The plugin only works if the protobuf descriptor files are generated *with* the --descriptor_set_out flag and accessible at runtime. Without descriptors, fields are not recognized.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'pylint_protobuf' in your Pylint config or command line.","message":"The import path has changed from 'pylint-protobuf' (hyphen) to 'pylint_protobuf' (underscore). Loading the old name will fail with a module-not-found error.","severity":"deprecated","affected_versions":">=0.20.0"},{"fix":"Upgrade to Python 3.6+ and Pylint 2.4+.","message":"Version 0.21.0 dropped support for Python 2 and older Pylint versions (<2.4).","severity":"breaking","affected_versions":">=0.21.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Replace 'pylint-protobuf' with 'pylint_protobuf' in your Pylint configuration.","cause":"Using hyphen instead of underscore in the plugin name (old style).","error":"pylint: 'pylint-protobuf' is not a valid plugin"},{"fix":"1) Ensure --load-plugins=pylint_protobuf is set. 2) Verify that protobuf descriptors are present (compile with --descriptor_set_out).","cause":"The plugin is either not loaded or cannot access the protobuf descriptor.","error":"Module 'mymodule' has no 'some_field' member (no-member)"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}