mypy --strict
fails with Name "betterproto.ServiceStub" is not defined
#577
Labels
mypy --strict
fails with Name "betterproto.ServiceStub" is not defined
#577
Summary
mypy --strict
fails withName "betterproto.ServiceStub" is not defined
Reproduction Steps
mypy
on the generated codeExpected Results
mypy
passes.Actual Results
Where the stub class is defined in the generated code.
I see the symbol is imported in https://github.com/danielgtaylor/python-betterproto/blob/master/src/betterproto/__init__.py, but it seems like
mypy
needs imported symbols to be explicitly exported, probably via__all__
or usingfrom x import y as y
(see https://peps.python.org/pep-0484/#stub-files).System Information
(I'm using
grpcio-tools
to generate the files, notprotoc
)Checklist
pip install -U --pre betterproto
, if possible.The text was updated successfully, but these errors were encountered: