Description
On a call to validate as of 2.0.0, basedpyright says:
Type of "validate" is partially unknown
Type of "validate" is
"(message: protobuf._message.Message[Unknown] |
google.protobuf.message.Message, *, fail_fast: bool = False) -> None"
(reportUnknownMemberType)
Steps to Reproduce
# pyright: strict
import protovalidate
from google.protobuf import empty_pb2
message = empty_pb2.Empty()
protovalidate.validate(message)
uv init --bare
uv add protovalidate==2.0.0 basedpyright
uv run basedpyright repro.py
Possible Solution
I think you can parameterize Message2[Any] as the simplest fix, although it might be more correct to add a typevar and do Message2[T]? Not sure, I haven't looked into the code deeply.
Description
On a call to validate as of 2.0.0, basedpyright says:
Steps to Reproduce
Possible Solution
I think you can parameterize Message2[Any] as the simplest fix, although it might be more correct to add a typevar and do Message2[T]? Not sure, I haven't looked into the code deeply.