nelfin / pylint-protobuf

A plugin for making Pylint aware of the fields of protobuf-generated classes
MIT License
29 stars 12 forks source link

Correctly recognize (and warn on) repeated message fields #15

Closed mishas closed 3 years ago

mishas commented 5 years ago

This plugin correctly recognizes native repeated fields (as in repeated int32 filed = 1;), but doesn't recognize repeated fields of messages (as in repeated MyMessage field = 2;).

For those fields I get errors for both the .add() and the .extends() methods. (Please note that repeated message fields do not have the .append() field).

nelfin commented 5 years ago

This is a known issue, there's a bunch of XFAIL tests in tests/test_repeated.py (actually only one now that I check it). I should make it clearer in the readme, and I'll prioritise working on it.

nelfin commented 3 years ago

(Please note that repeated message fields do not have the .append() field). I assume this is meant to read "repeated scalar fields do not have the .append() method"

I'm pleased to report that repeated fields are fully supported as of the 0.18.x release. Sorry for the wait!

nelfin commented 3 years ago

Let me know if you have any further issues with repeated fields