// example.proto
syntax = "proto3";
message Example {
int32 value = 1;
float fraction = 2;
}
# issue40b.py
from example_pb2 import Example
Example(fraction=123)
We warn but shouldn't:
$ pylint issue40b.py
************* Module issue40b
issue40b.py:2:0: E5903: Field "Example.fraction" is of type 'float' and value 123 will raise TypeError at runtime (protobuf-type-error)
$ python issue40b.py # no error
Ref #40. Given:
We warn but shouldn't: