From f897320e425e7d1ef3d61a77051d1f74d81b1846 Mon Sep 17 00:00:00 2001 From: Justin Ibarra <16747370+brokensound77@users.noreply.github.com> Date: Tue, 17 Sep 2024 12:51:54 -0700 Subject: [PATCH] Revert "[Bug] Handle formatting empty list (#4086)" This reverts commit df31c002ca3a4f56b978433e9a7ca5ea30de7641. --- detection_rules/rule_formatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detection_rules/rule_formatter.py b/detection_rules/rule_formatter.py index e4b4d704b60..e7c84611d36 100644 --- a/detection_rules/rule_formatter.py +++ b/detection_rules/rule_formatter.py @@ -161,7 +161,7 @@ def dump_list(self, v): dump.append(' ' * 4 + self.dump_value(item)) return '[\n{},\n]'.format(',\n'.join(dump)) - if v and all(isinstance(i, dict) for i in v): + if all(isinstance(i, dict) for i in v): # Compact inline format for lists of dictionaries with proper indentation retval = "\n" + ' ' * 2 + "[\n" retval += ",\n".join([' ' * 4 + self.dump_inline_table(u).strip() for u in v])