Skip to content

docs(tracer): Fix Tracer typing hinting for Pycharm#345

Merged
heitorlessa merged 4 commits into
aws-powertools:developfrom
gyft:fix-tracer-typing
Mar 17, 2021
Merged

docs(tracer): Fix Tracer typing hinting for Pycharm#345
heitorlessa merged 4 commits into
aws-powertools:developfrom
gyft:fix-tracer-typing

Conversation

@michaelbrewer
Copy link
Copy Markdown
Contributor

@michaelbrewer michaelbrewer commented Mar 17, 2021

Issue #, if available:

Typing for Tracer seems to be broken on PyCharm, see screenshot below:

Screen Shot 2021-03-17 at 6 39 54 AM

The location of the Returns doc string is causing the PyCharm linter to thing that Tracer is a tuple (possibly also due to the _default_config and _config before the __init__ ?

Description of changes:

Changes:

  • Move up Returns to just below the Parameters
  • Add type hinting for provider
  • Add docstring for provider

Checklist

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

@michaelbrewer
Copy link
Copy Markdown
Contributor Author

@heitorlessa this seems to fix the issue with PyCharm and Tracer

@heitorlessa heitorlessa added this to the 1.12.0 milestone Mar 17, 2021
@heitorlessa heitorlessa added area/tracer bug Something isn't working labels Mar 17, 2021
Copy link
Copy Markdown
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.

tiny change and it should be good to release!

Comment thread aws_lambda_powertools/tracing/tracer.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants