We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent def2a9e commit df31c00Copy full SHA for df31c00
detection_rules/rule_formatter.py
@@ -161,7 +161,7 @@ def dump_list(self, v):
161
dump.append(' ' * 4 + self.dump_value(item))
162
return '[\n{},\n]'.format(',\n'.join(dump))
163
164
- if all(isinstance(i, dict) for i in v):
+ if v and all(isinstance(i, dict) for i in v):
165
# Compact inline format for lists of dictionaries with proper indentation
166
retval = "\n" + ' ' * 2 + "[\n"
167
retval += ",\n".join([' ' * 4 + self.dump_inline_table(u).strip() for u in v])
0 commit comments