Skip to content

Commit

Permalink
fix: remove use of deprecated Ellipsis (#699)
Browse files Browse the repository at this point in the history
  • Loading branch information
ss2165 authored Dec 10, 2024
1 parent 684f485 commit b819a84
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion guppylang/ast_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,4 +343,8 @@ def has_empty_body(func_ast: ast.FunctionDef) -> bool:
if len(func_ast.body) > 1:
return False
[n] = func_ast.body
return isinstance(n, ast.Expr) and isinstance(n.value, ast.Ellipsis)
return (
isinstance(n, ast.Expr)
and isinstance(n.value, ast.Constant)
and n.value.value == Ellipsis
)

0 comments on commit b819a84

Please sign in to comment.