Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for gRPC mypy stub files (#11658)
### Problem Pants currently supports generating mypy stubs for the generated protobuf code, which makes mypy very happy. However, when type checking a codebase that has generated gRPC code as well, mypy throws quite the hissy fit due to the lack of gRPC stubs. ### Solution mypy-protobuf can ([since version 2.0](https://github.com/dropbox/mypy-protobuf/blob/master/CHANGELOG.md#20) at least) generate gRPC stubs as well, and it can be used in Pants with some minor changes. It will, of course, only work on mypy-protobuf 2.0+. ### Result Stubs are now generated for the generated gRPC code as well when mypy-protobuf >= 2 is used! Awesome!
- Loading branch information
Showing
2 changed files
with
108 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters