Skip to content

Commit

Permalink
fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusandra committed Aug 26, 2024
1 parent 5fafd52 commit faf5442
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions posthog/hogql/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def __init__(
self.database = context.database
self.cte_counter = 0

def visit(self, node: ast.Expr | None) -> ast.Expr:
def visit(self, node: ast.AST | None):
if isinstance(node, ast.Expr) and node.type is not None:
raise ResolutionError(
f"Type already resolved for {type(node).__name__} ({type(node.type).__name__}). Can't run again."
Expand Down Expand Up @@ -538,7 +538,7 @@ def visit_lambda(self, node: ast.Lambda):

new_node = cast(ast.Lambda, clone_expr(node))
new_node.type = node_type
new_node.expr = cast(ast.Expr | ast.Block, self.visit(new_node.expr))
new_node.expr = self.visit(new_node.expr)

self.scopes.pop()

Expand Down

0 comments on commit faf5442

Please sign in to comment.