Skip to content

Commit a0798aa

Browse files
Add docstring
1 parent 6456cbc commit a0798aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

detection_rules/remote_validation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,14 @@ def request(c: TOMLRuleContents) -> None:
179179
return responses # type: ignore[reportUnknownVariableType]
180180

181181
def validate_esql(self, contents: TOMLRuleContents, index_replacement: bool = False) -> dict[str, Any]:
182+
"""Validate query for "esql" rule types. Optionally replace indices and use ESQLValidator."""
182183
query = contents.data.query # type: ignore[reportAttributeAccessIssue]
183184
rule_id = contents.data.rule_id
184185
if not self.es_client:
185186
raise ValueError("No ES client found")
186-
187187
if not self.kibana_client:
188188
raise ValueError("No Kibana client found")
189+
189190
if index_replacement:
190191
try:
191192
validator = ESQLValidator(contents.data.query) # type: ignore[reportIncompatibleMethodOverride]

0 commit comments

Comments
 (0)