Skip to content

Commit bcecaac

Browse files
committed
chore: replace ast.Str for py3.14
Signed-off-by: lafirm <136463254+lafirm@users.noreply.github.com>
1 parent 118003a commit bcecaac

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

sqlmesh/utils/metaprogramming.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,12 @@ def normalize_source(obj: t.Any) -> str:
265265

266266
# remove docstrings
267267
body = node.body
268-
if body and isinstance(body[0], ast.Expr) and isinstance(body[0].value, ast.Str):
268+
if (
269+
body
270+
and isinstance(body[0], ast.Expr)
271+
and isinstance(body[0].value, ast.Constant)
272+
and isinstance(body[0].value.value, str)
273+
):
269274
node.body = body[1:]
270275

271276
# remove function return type annotation

0 commit comments

Comments
 (0)