Skip to content

Commit 7c82602

Browse files
andyzzhaoclaude
andcommitted
fix(clickhouse): satisfy ty on analyzer suggestion types
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 8aa4679 commit 7c82602

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

ee/clickhouse/materialized_columns/analyze.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from collections import defaultdict
22
from datetime import timedelta
3-
from typing import Optional
3+
from typing import Optional, cast
44

55
import structlog
66

@@ -93,7 +93,9 @@ def _analyze(
9393
),
9494
)
9595

96-
suggestions = [("events", table_column, property_name) for (table_column, property_name) in raw_queries]
96+
suggestions: list[Suggestion] = [
97+
("events", table_column, property_name) for (table_column, property_name) in raw_queries
98+
]
9799

98100
# With property groups enabled, the printer reads unmaterialized properties through map columns
99101
# (e.g. properties_group_custom['foo']) instead of JSONExtract, so those reads never match the regex
@@ -165,7 +167,7 @@ def _analyze(
165167

166168
seen = set(suggestions)
167169
for group_column, property_name in raw_group_queries:
168-
suggestion = ("events", group_columns_to_source[group_column], property_name)
170+
suggestion: Suggestion = ("events", cast(TableColumn, group_columns_to_source[group_column]), property_name)
169171
if suggestion not in seen:
170172
seen.add(suggestion)
171173
suggestions.append(suggestion)

0 commit comments

Comments
 (0)