-
Notifications
You must be signed in to change notification settings - Fork 432
refactor(logger): improve typing #3869
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
refactor(logger): improve typing #3869
Conversation
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
No related issues found. Please ensure there is an open issue related to this change to avoid significant delays or closure. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #3869 +/- ##
========================================
Coverage 96.38% 96.38%
========================================
Files 214 214
Lines 10030 10109 +79
Branches 1846 1868 +22
========================================
+ Hits 9667 9744 +77
- Misses 259 261 +2
Partials 104 104 ☔ View full report in Codecov by Sentry. |
Hello @aminalaee! Thanks for submitting this PR to fix the type annotation issue. For me it's fine and working as expected, but I would like the other maintainers to take a look before merging this. |
|
Great job, thank you for adding this! |
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
Thanks for the PR! I have found another line causing problems when using Pyright in the strict mode:
Do you know what type it should be annotated? |
Hey @rafrafek! Thanks for your comment. It's often challenging to find comments in closed PRs and issues. For better visibility next time, consider opening a new issue or starting a discussion.
If we annotate it as def append_keys(self, **additional_keys: object) -> None:
self.registered_formatter.append_keys(**additional_keys) Do you want to send a PR to fix this? Thanks |
Hey @leandrodamascena, I have created #3988 with your suggested changes. Thanks! |
Issue Number: #3171
Summary
Improve typing of
Logger
methods:info
, 'debug', 'warning', 'critical', ...The type hints are added per typeshed to avoid any conflicts.
Changes
User experience
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
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.