From 6a869bb2ebe9814b5e917d241aada4a873eae11e Mon Sep 17 00:00:00 2001 From: Rafa Audibert Date: Thu, 12 Dec 2024 18:32:05 -0300 Subject: [PATCH] fix: fix mypy error --- .../hogql_queries/utils/query_previous_period_date_range.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/posthog/hogql_queries/utils/query_previous_period_date_range.py b/posthog/hogql_queries/utils/query_previous_period_date_range.py index e4aa8b9e1368a..df1ef53d4e069 100644 --- a/posthog/hogql_queries/utils/query_previous_period_date_range.py +++ b/posthog/hogql_queries/utils/query_previous_period_date_range.py @@ -3,7 +3,7 @@ from posthog.hogql_queries.utils.query_date_range import QueryDateRange from posthog.models.team import Team -from posthog.schema import InsightDateRange, IntervalType +from posthog.schema import DateRange, InsightDateRange, IntervalType from posthog.utils import ( get_compare_period_dates, relative_date_parse_with_delta_mapping, @@ -15,13 +15,13 @@ class QueryPreviousPeriodDateRange(QueryDateRange): """Translation of the raw `date_from` and `date_to` filter values to datetimes.""" _team: Team - _date_range: Optional[InsightDateRange] + _date_range: Optional[InsightDateRange | DateRange] _interval: Optional[IntervalType] _now_without_timezone: datetime def __init__( self, - date_range: Optional[InsightDateRange], + date_range: Optional[InsightDateRange | DateRange], team: Team, interval: Optional[IntervalType], now: datetime,