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

fix(tracer): Correct type hint for MyPy #365

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

michaelbrewer
Copy link
Contributor

@michaelbrewer michaelbrewer commented Mar 25, 2021

Issue #, if available:

#360

Description of changes:

Changes:

  • Type hint lambda_handler as a Union with and without kwargs
  • Mark method params as required, when they are
  • Type hint patch_modules as a Unit of Tuple or List

Checklist

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@heitorlessa heitorlessa left a comment

Choose a reason for hiding this comment

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

Thanks a lot @michaelbrewer !!

@michaelbrewer
Copy link
Contributor Author

Thanks a lot @michaelbrewer !!

Sorry it had to be a Union and this is MyPy gets pretty confusing :)

@heitorlessa heitorlessa merged commit 7c9a319 into aws-powertools:develop Mar 25, 2021
@michaelbrewer michaelbrewer deleted the fix-tracer-typing branch March 25, 2021 18:43
@heitorlessa
Copy link
Contributor

heitorlessa commented Mar 25, 2021 via email

heitorlessa referenced this pull request in heitorlessa/aws-lambda-powertools-python Apr 4, 2021
* develop:
  fix(idempotent): Correctly raise IdempotencyKeyError (#378)
  feat(event-handler): Add AppSync handler decorator (#363)
  feat(parameter): add dynamodb_endpoint_url for local_testing (#376)
  fix(parser): S3Model support empty keys (#375)
  fix(data-classes): Add missing operationName (#373)
  fix: perf tests for Logger and fail str msgs
  feat(parser): Add S3 Object Lambda Event (#362)
  build(pre-commit): Add pre-commit to make pr (#368)
  fix(tracer): Correct type hint for MyPy (#365)
  fix(metrics): AttributeError raised by MediaManager and Typing and docs (#357)

Signed-off-by: heitorlessa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants