<#19766 Infer a dep on types-protobuf when running...
# github-notifications
c
#19766 Infer a dep on types-protobuf when running mypy on protobuf-generated code Issue created by benjyw Today adding the dep manually allows it to typecheck:
Copy code
protobuf_sources(
    dependencies = ["3rdparty/python#types-protobuf"],
)
As long as this is set too:
Copy code
[python-protobuf]
mypy_plugin = true
that is. We should add this dep automatically. Note that without types-protobuf you would have to set this in mypy.ini:
Copy code
[mypy-*.v1.*]
ignore_errors = True
Which would cause mypy to miss some type information from the generated code, which would in turn cause it to miss errors (such as accessing unknown fields) in code that uses the generated code. pantsbuild/pants