protocolbuffers / protocolbuffers/protobuf
[Python] Protobuf python generated pb2 files are without typing files
@anandolee is already working on this.
Since Jul 9, 2024.
- Dominant language
- C++
- Stars
- 72k
- Forks
- 16.3k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 140
Description
Please generate with pyi files for python for builtin types.
Currently we have a lot of errors using those types with pylint and need to ignore checking:
'google.protobuf.timestamp_pb2' has no 'Timestamp' member .
What version of protobuf and what language are you using?
Version: 4.25.2 (from pypi)
Language: Python
What operating system (Linux, Windows, ...) and version?
MacOSX, Linux
What runtime / compiler are you using (e.g., python version or gcc version)
python 3.11.2
What did you do?
import "google/protobuf/timestamp.proto";
message SomeMessage {
google.protobuf.Timestamp timestamp = 2;
}
python -m grpc_tools.protoc -I. --python_out=. --pyi_out=. --grpc_python_out=. *.proto
What did you expect to see
Protobuf should include pyi files and pass pylint validation when using timestampa type.
What did you see instead?
'google.protobuf.timestamp_pb2' has no 'Timestamp' member .
Anything else we should know about your project / environment
/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.