Skip to content

[DRAFT] Remove sentry.snuba.metrics.query_builder from mypy ignore list - #123710

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

[DRAFT] Remove sentry.snuba.metrics.query_builder from mypy ignore list#123710
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/untyped-module-cleanup-7eed

Conversation

@cursor

@cursor cursor Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • remove sentry.snuba.metrics.query_builder from the sentry modules with typing issues override list in pyproject.toml
  • add missing type annotations across src/sentry/snuba/metrics/query_builder.py so the module passes strict mypy checks
  • simplify the overloaded signature handling in generate_snql_for_action_by_fields to avoid an invalid overload pairing

Testing

  • PYTHONPATH=src python3 -m mypy --config-file /tmp/mypy-min.ini src/sentry/snuba/metrics/query_builder.py
  • python3 -uSm tools.mypy_helpers.check_stronglist pyproject.toml
  • python3 -m py_compile src/sentry/snuba/metrics/query_builder.py

cc @armenzg for review.

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 Sep 6, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant