Skip to content

Conversation

@ConnorKirk
Copy link
Contributor

@ConnorKirk ConnorKirk commented Jan 19, 2026

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)

  • Added guard clause for None values from dict.get() before comparison
  • The < operator doesn't support int | None operands

metrics/base.py (2 diagnostics fixed)

  • Added cast for functools.wraps to handle union callable type
  • Added set_default_dimensions stub method to MetricManager base class

User 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.

@ConnorKirk ConnorKirk requested a review from a team as a code owner January 19, 2026 16:58
@ConnorKirk ConnorKirk requested a review from hjgraca January 19, 2026 16:58
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 19, 2026
@github-actions github-actions bot added the bug Something isn't working label Jan 19, 2026
- 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
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.72%. Comparing base (d04d30f) to head (402cfd4).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ConnorKirk ConnorKirk force-pushed the maintenance/ty-diagnostics-7902 branch from 5b5b7bb to e00a25e Compare January 19, 2026 17:07
@boring-cyborg boring-cyborg bot added the tests label Jan 19, 2026
@ConnorKirk ConnorKirk marked this pull request as draft January 19, 2026 17:13
@ConnorKirk ConnorKirk self-assigned this Jan 19, 2026
@sonarqubecloud
Copy link

@ConnorKirk ConnorKirk marked this pull request as ready for review January 19, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working logger metrics size/S Denotes a PR that changes 10-29 lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maintenance: Resolve Ty diagnostics for modules with few issues

1 participant