Skip to content

Commit

Permalink
Fix type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
webjunkie committed Dec 6, 2023
1 parent 55a8199 commit 2cb2e70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,7 @@ describe('filtersToQueryNode', () => {
const query: InsightQueryNode = {
kind: NodeKind.RetentionQuery,
filterTestAccounts: true,
retentionFilter: {},
}
result.retentionFilter = {} // Put this here to make TS happy
} as InsightQueryNode
expect(result).toEqual(query)
})

Expand Down Expand Up @@ -198,7 +196,6 @@ describe('filtersToQueryNode', () => {

const query: InsightQueryNode = {
kind: NodeKind.RetentionQuery,
retentionFilter: {},
properties: {
type: FilterLogicalOperator.And,
values: [
Expand All @@ -215,8 +212,7 @@ describe('filtersToQueryNode', () => {
},
],
},
}
result.retentionFilter = {} // Put this here to make TS happy
} as InsightQueryNode
expect(result).toEqual(query)
})

Expand All @@ -231,13 +227,11 @@ describe('filtersToQueryNode', () => {

const query: InsightQueryNode = {
kind: NodeKind.RetentionQuery,
retentionFilter: {},
dateRange: {
date_to: '2021-12-08',
date_from: '2021-12-08',
},
}
result.retentionFilter = {} // Put this here to make TS happy
} as InsightQueryNode
expect(result).toEqual(query)
})
})
Expand Down
2 changes: 1 addition & 1 deletion posthog/hogql/test/test_property.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ def test_entity_to_expr_events_type_without_id(self):
self.assertEqual(result, ast.Constant(value=True))

def test_entity_to_expr_default_case(self):
entity = RetentionEntity(**{"type": "other_type"})
entity = RetentionEntity()
result = entity_to_expr(entity, default_event="default_event")
expected = ast.CompareOperation(
op=ast.CompareOperationOp.Eq,
Expand Down

0 comments on commit 2cb2e70

Please sign in to comment.