Skip to content

fix(typing): Rename detector_id annotation to avoid shadowing model field#107791

Draft
JoshFerge wants to merge 2 commits intomasterfrom
jferg/fix-typing-workflow-group-history
Draft

fix(typing): Rename detector_id annotation to avoid shadowing model field#107791
JoshFerge wants to merge 2 commits intomasterfrom
jferg/fix-typing-workflow-group-history

Conversation

@JoshFerge
Copy link
Member

@JoshFerge JoshFerge commented Feb 6, 2026

Summary

  • Rename .annotate(detector_id=...) to .annotate(group_detector_id=...) to avoid shadowing WorkflowFireHistory.detector_id FK field
  • Update _Result TypedDict and convert_results to use the new name
  • Eliminates mypy no-redef error without needing type: ignore
  • Pre-work for mypy 1.19 upgrade

Ref: #107710

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 6, 2026
@JoshFerge JoshFerge force-pushed the jferg/fix-typing-workflow-group-history branch from 0294907 to 9be7e3d Compare February 6, 2026 19:04
…ield

Rename the `.annotate(detector_id=...)` to `.annotate(group_detector_id=...)`
to avoid shadowing WorkflowFireHistory's own `detector_id` FK field.
This eliminates the mypy no-redef error without needing a type: ignore.

Ref: #107710
@JoshFerge JoshFerge force-pushed the jferg/fix-typing-workflow-group-history branch from 9be7e3d to e686803 Compare February 6, 2026 19:15
@JoshFerge JoshFerge changed the title fix(typing): Suppress no-redef for detector_id in workflow history serializer fix(typing): Rename detector_id annotation to avoid shadowing model field Feb 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