1 parent 7045bd9 commit 1967ab6Copy full SHA for 1967ab6
1 file changed
sqlmesh/utils/metaprogramming.py
@@ -265,7 +265,12 @@ def normalize_source(obj: t.Any) -> str:
265
266
# remove docstrings
267
body = node.body
268
- if body and isinstance(body[0], ast.Expr) and isinstance(body[0].value, ast.Str):
+ 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
+ ):
274
node.body = body[1:]
275
276
# remove function return type annotation
0 commit comments