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

Update make lint #4534

Merged
merged 2 commits into from
Jan 6, 2023
Merged

Update make lint #4534

merged 2 commits into from
Jan 6, 2023

Conversation

hawflau
Copy link
Contributor

@hawflau hawflau commented Jan 4, 2023

Which issue(s) does this change fix?

N/A

Why is this change necessary?

Since we introduced ruamel as a dependency, running make pr fails every other time because of an issue in mypy
E.g.:

tests/unit/lib/sync/flows/test_rest_api_sync_flow.py:1: error: Skipping analyzing 'ruamel': found module but no type hints or library stubs
tests/unit/lib/sync/flows/test_http_api_sync_flow.py:1: error: Skipping analyzing 'ruamel': found module but no type hints or library stubs
tests/unit/lib/sync/flows/test_function_sync_flow.py:1: error: Skipping analyzing 'ruamel': found module but no type hints or library stubs
samcli/lib/sync/flows/zip_function_sync_flow.py:1: error: Skipping analyzing 'ruamel': found module but no type hints or library stubs

Issue in mypy:

How does it address the issue?

Apply --no-incredental as a workaround to not use mypy's cachcing mechanism. So it doesn't hit the error.

What side effects does this change have?

mypy/make lint could run slower since it forces mypy to not use caching.

Note that in our CI/CD jobs, mypy is run only once. So we won't have any issue in our CI/CD jobs.
This change helps smoothing the local dev experience a bit because mypy fixes the issue.

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • Add input/output type hints to new functions/methods
  • Write design document if needed (Do I need to write a design document?)
  • Write/update unit tests
  • Write/update integration tests
  • Write/update functional tests if needed
  • make pr passes
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@hawflau hawflau requested a review from a team as a code owner January 4, 2023 17:08
@hawflau hawflau enabled auto-merge (squash) January 6, 2023 00:15
@hawflau hawflau merged commit 42e2575 into aws:develop Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants