Skip to content

Commit 7515990

Browse files
authored
Do not set audit descriptions field with file comment (#2056)
1 parent 6cdbc39 commit 7515990

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

sqlmesh/core/audit/definition.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,6 @@ def load_audit(
485485
raise
486486

487487
meta_fields = {p.name: p.args.get("value") for p in meta.expressions if p}
488-
if meta.comments:
489-
meta_fields["description"] = "\n".join(comment.strip() for comment in meta.comments)
490488

491489
standalone_field = meta_fields.pop("standalone", None)
492490
if standalone_field and not isinstance(standalone_field, exp.Boolean):

tests/core/test_audit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def model_default_catalog() -> Model:
3737
def test_load(assert_exp_eq):
3838
expressions = parse(
3939
"""
40+
-- Audit comment
4041
Audit (
4142
name my_audit,
4243
dialect spark,

0 commit comments

Comments
 (0)