-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(agw): Address mypy errors in lte/gateway/python/ #14889
Conversation
Thanks for opening a PR! 💯
Howto
More infoPlease take a moment to read through the Magma project's
If this is your first Magma PR, also consider reading
|
f1cd3d8
to
ea6f78b
Compare
overall lgtml. when I run mypy locally I still get one error
Any idea for this? There are a lot of proto imports that are not flagged. |
Looked into this offline in pairing. Looks like mypy (and python) think the import is working because there is an (unrelated) folder |
Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com>
ea6f78b
to
9d6444f
Compare
Oops! Looks like you failed the Howto
♻️ Updated: ✅ The check is passing the AGW Build & Format Python after the last commit. |
Thanks for flagging this @nstng. For some reason that error only shows up for me sometimes, so I've excluded it for now. The same import is used several times in orc8r/gateway/python, but I don't see mypy errors for these cases when I run |
Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com>
9d6444f
to
be10a07
Compare
Yes, sounds good. Checked the exclude -> no more errors for me :) |
* fix(agw): Address mypy errors in lte/gateway/python/ Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com> * fix(agw): Ignore protobuf import in mypy Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com> --------- Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com>
Summary
Fixes all 60 mypy errors in lte/gateway/python. The errors can be looked at locally by running
cd $MAGMA_ROOT && mypy lte/gateway/python/
. For this, I have been using mypy version 0.991, which is the same as is running in the CI.Note that in
pipelined_test_util.py
, I convertedSubTest
from a named tuple into a dataclass, following the discussion here.Test Plan
bazel test //lte/gateway/python/...
bazel/scripts/run_sudo_tests.sh