Closed perlinm closed 8 months ago
Not sure what to do about this failing type check:
./checks/mypy_.py
passes for me locally (including from a fresh environment)
Which package are you using that has the google
dependency in site-packages
that mypy is trying to check?
i got the same error. it goes away if you uninstall types-protobuf after running mypy once
it's picking up on this import in cvxpy, which is only relevant to cvxpy[ortools]
(and so the package isn't required otherwise): https://github.com/cvxpy/cvxpy/blob/ad6cafb117d24f82e094147e07a5f77a022ad1a8/cvxpy/reductions/solvers/conic_solvers/glop_conif.py#L49
the quick fix is to disable the install_types
option for mypy (and add any relevant types- packages to the dev requirements). imo this is a mypy bug though
apparently this is a known issue https://github.com/python/typeshed/issues/11254
the best solution is probably just to pin
types-protobuf <= 4.24.0.4
for now (and unpin once that issue is resolved)
Awesome that worked! Thank you @richrines1!
Based on these continuous integration tests in
client-superstaq