From c00df647e1fa793d45ecc956898496bc7900343c Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Fri, 20 Jan 2023 09:00:41 +0100 Subject: [PATCH] fix: Update add_rule.py to account for 81996f1bc --- scripts/add_rule.py | 4 +++- scripts/pyproject.toml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/add_rule.py b/scripts/add_rule.py index d61a249b38..100ca0c2d0 100755 --- a/scripts/add_rule.py +++ b/scripts/add_rule.py @@ -91,7 +91,7 @@ impl Violation for %s { if has_written: continue - if line.startswith("define_rule_mapping!"): + if line.startswith("ruff_macros::define_rule_mapping!"): seen_macro = True continue @@ -104,6 +104,8 @@ impl Violation for %s { fp.write("\n") has_written = True + assert has_written + if __name__ == "__main__": parser = argparse.ArgumentParser( diff --git a/scripts/pyproject.toml b/scripts/pyproject.toml index 3987088ce7..9bafb4d715 100644 --- a/scripts/pyproject.toml +++ b/scripts/pyproject.toml @@ -1,6 +1,7 @@ [tool.ruff] select = ["ALL"] ignore = [ + "S101", # assert-used "PLR2004", # magic-value-comparison ]