-
Notifications
You must be signed in to change notification settings - Fork 469
fix(typing): resolve ty diagnostics in logging and metrics modules #7953
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
Conversation
- logging/buffer/functions.py: add guard clause for None values from dict.get() before comparison - metrics/base.py: add cast for functools.wraps union type, add set_default_dimensions stub to base class Resolves 3 of 10 diagnostics from #7929
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7953 +/- ##
========================================
Coverage 96.72% 96.72%
========================================
Files 278 278
Lines 13627 13630 +3
Branches 1083 1084 +1
========================================
+ Hits 13181 13184 +3
Misses 327 327
Partials 119 119 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
5b5b7bb to
e00a25e
Compare
leandrodamascena
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved! Thanks @ConnorKirk
|



Issue number: closes #7929 (partial)
Summary
Resolves 3 of 10 ty diagnostics to expand type checking coverage.
Changes
logging/buffer/functions.py (1 diagnostic fixed)
Nonevalues fromdict.get()before comparison<operator doesn't supportint | Noneoperandsmetrics/base.py (2 diagnostics fixed)
castforfunctools.wrapsto handle union callable typeset_default_dimensionsstub method toMetricManagerbase classUser experience
No user-facing changes. This is an internal typing improvement that enables stricter type checking with the ty type checker.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.