fix(typing): Fix type of Metrics.set_timestamp argument#7582
Conversation
The docstring is correct but the type hint is not. The underlying AmazonCloudWatchEMFProvider.set_timestamp supports both int and datetime.datetime.
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
|
leandrodamascena
left a comment
There was a problem hiding this comment.
Thanks for fixing that! APPROVED!
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7582 +/- ##
========================================
Coverage 96.49% 96.49%
========================================
Files 275 275
Lines 13110 13110
Branches 985 985
========================================
Hits 12650 12650
Misses 356 356
Partials 104 104 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |



Issue number: closes #7581
Summary
The docstring is correct but the type hint is not.
The underlying
AmazonCloudWatchEMFProvider.set_timestampsupports bothintanddatetime.datetime.Changes
Just a minor fix: extend type from
inttoint | datetime.datetime.User experience
No more type warnings if an instance of
datetime.datetimeis passed toMetrics.set_timestamp().By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.