Skip to content

Draft: Type sentry.search.events.builder.metrics and remove module ignore#116964

Draft
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/untyped-module-cleanup-37c5
Draft

Draft: Type sentry.search.events.builder.metrics and remove module ignore#116964
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/untyped-module-cleanup-37c5

Conversation

@cursor

@cursor cursor Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Removed sentry.search.events.builder.metrics from the sentry modules with typing issues override list in pyproject.toml
  • Fixed all mypy errors in src/sentry/search/events/builder/metrics.py by tightening optional handling and aligning override signatures with the base query builder
  • Kept runtime behavior intact while making type assumptions explicit

Testing

  • .venv/bin/python -m tools.mypy_helpers.mypy_without_ignores -m sentry.search.events.builder.metrics
  • .venv/bin/mypy --config pyproject.toml -m sentry.search.events.builder.metrics
  • .venv/bin/pytest -n0 -svv --reuse-db tests/sentry/search/events/builder/test_metrics.py::MetricQueryBuilderTest::test_count tests/sentry/search/events/builder/test_metrics.py::MetricQueryBuilderTest::test_get_snql_query tests/sentry/search/events/builder/test_metrics.py::TimeseriesMetricQueryBuilderTest::test_on_demand_map_with_multiple_selected tests/sentry/search/events/builder/test_metrics.py::TimeseriesMetricQueryBuilderTest::test_on_demand_map_with_multiple_percentiles
  • .venv/bin/prek run -q

Review

@armenzg please review this draft PR.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Open in Web View Automation 

Co-authored-by: Armen Zambrano G. <armenzg@users.noreply.github.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 5, 2026
@getsantry

getsantry Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry Bot added the Stale label Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant