Skip to content
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

chore: fix mypy static type checking issues #12086

Merged
merged 7 commits into from Mar 24, 2022

Conversation

Neudrino
Copy link
Contributor

@Neudrino Neudrino commented Mar 11, 2022

Summary

ℹ️ Commit wise review suggested.

Further cleanup for mypy introduction.
Follow up on:

Test Plan

Install mypy in a virtualenv and execute it via

cd $MAGMA_ROOT
mypy lte/gateway/python/

Before:

Found 14 errors in 6 files (checked 179 source files)

After:

Success: no issues found in 179 source files

@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines. label Mar 11, 2022
@github-actions
Copy link
Contributor

Thanks for opening a PR! 💯

A couple initial guidelines

Howto

  • Reviews. The "Reviewers" listed for this PR are the Magma maintainers who will shepherd it.
  • Checks. All required CI checks must pass before merge.
  • Merge. Once approved and passing CI checks, use the ready2merge label to indicate the maintainers can merge your PR.

More info

Please take a moment to read through the Magma project's

If this is your first Magma PR, also consider reading

@github-actions github-actions bot added the component: agw Access gateway-related issue label Mar 11, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2022

Oops! Looks like you failed the DCO check. Be sure to sign all your commits.

Howto

♻️ Updated: ✅ The check is passing the DCO check after the last commit.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2022

Oops! Looks like you failed the Python Format Check.

Howto

♻️ Updated: ✅ The check is passing the Python Format Check after the last commit.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2022

feg-workflow

    2 files  202 suites   33s ⏱️
362 tests 362 ✔️ 0 💤 0
376 runs  376 ✔️ 0 💤 0

Results for commit eae44ba.

♻️ This comment has been updated with latest results.

@Neudrino Neudrino force-pushed the ci/python-linter-fixes branch 8 times, most recently from 11e5526 to 8add81c Compare March 11, 2022 13:05
@@ -84,7 +75,7 @@ def benchmark_grpc_request(
output_file: str,
num_reqs: int,
address: str,
import_path: str = None,
import_path: str,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out, that the import path is not actually optional, but always given by the caller.
I.e. the logic to "intelligently" determine some protobuf path can be removed.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2022

agw-workflow

  50 files    77 suites   5m 41s ⏱️
896 tests 887 ✔️ 9 💤 0
897 runs  888 ✔️ 9 💤 0

Results for commit eae44ba.

♻️ This comment has been updated with latest results.

@Neudrino Neudrino marked this pull request as ready for review March 11, 2022 16:59
@Neudrino Neudrino requested review from a team and pshelar March 11, 2022 16:59
Copy link
Contributor

@pshelar pshelar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

lte/gateway/python/setup.py Outdated Show resolved Hide resolved
lte/gateway/python/magma/kernsnoopd/handlers.py Outdated Show resolved Hide resolved
lte/gateway/python/magma/kernsnoopd/snooper.py Outdated Show resolved Hide resolved
Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>
Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>
Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>
Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>
Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>
Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>
Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>
@Neudrino Neudrino added the ready2merge This PR is ready to be merged (is approved and passes all required checks) label Mar 21, 2022
@nstng nstng merged commit f98b0b4 into magma:master Mar 24, 2022
@Neudrino Neudrino deleted the ci/python-linter-fixes branch March 24, 2022 09:38
@github-actions
Copy link
Contributor

github-actions bot commented Mar 24, 2022

Unit Test Results

142 files  142 suites   1h 58m 31s ⏱️
292 tests 287 ✔️ 3 💤 1  1 🔥

For more details on these failures and errors, see this check.

Results for commit f98b0b4.

♻️ This comment has been updated with latest results.

ardzoht pushed a commit that referenced this pull request Mar 30, 2022
* chore: reduce mypy exclusion list

Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>

* chore: import_path is always given and must not be optional

Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>

* chore: exclude mypy warning

Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>

* chore: fix mypy type issue

Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>

* chore: fix mypy type issue

Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>

* chore: fix mypy type issue

Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>

* chore: fix mypy type issue

Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>
emakeev pushed a commit to emakeev/magma that referenced this pull request Aug 5, 2022
* chore: reduce mypy exclusion list

Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>

* chore: import_path is always given and must not be optional

Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>

* chore: exclude mypy warning

Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>

* chore: fix mypy type issue

Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>

* chore: fix mypy type issue

Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>

* chore: fix mypy type issue

Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>

* chore: fix mypy type issue

Signed-off-by: Fritz Lehnert <Fritz.Lehnert@tngtech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: agw Access gateway-related issue ready2merge This PR is ready to be merged (is approved and passes all required checks) size/M Denotes a PR that changes 30-99 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants