From 0a028ca6e729719a3371fbc8915505cd50afac97 Mon Sep 17 00:00:00 2001 From: Doston Toirov Date: Mon, 3 Feb 2025 09:20:50 -0500 Subject: [PATCH] fix lint --- .../plugins/event_filter/dashes_to_underscores.py | 6 +++--- .../plugins/event_filter/insert_hosts_to_meta.py | 14 +++++++------- extensions/eda/plugins/event_filter/json_filter.py | 10 +++++----- extensions/eda/plugins/event_filter/noop.py | 4 ++-- .../eda/plugins/event_filter/normalize_keys.py | 10 +++++----- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/extensions/eda/plugins/event_filter/dashes_to_underscores.py b/extensions/eda/plugins/event_filter/dashes_to_underscores.py index e170b68a..08dc5f9a 100644 --- a/extensions/eda/plugins/event_filter/dashes_to_underscores.py +++ b/extensions/eda/plugins/event_filter/dashes_to_underscores.py @@ -1,3 +1,6 @@ +import multiprocessing as mp +from typing import Any + DOCUMENTATION = r""" --- author: @@ -13,9 +16,6 @@ default: true """ -import multiprocessing as mp -from typing import Any - def main( event: dict[str, Any], overwrite: bool = True diff --git a/extensions/eda/plugins/event_filter/insert_hosts_to_meta.py b/extensions/eda/plugins/event_filter/insert_hosts_to_meta.py index 3d05eb0e..dcfc34be 100644 --- a/extensions/eda/plugins/event_filter/insert_hosts_to_meta.py +++ b/extensions/eda/plugins/event_filter/insert_hosts_to_meta.py @@ -1,3 +1,10 @@ +from __future__ import annotations + +import logging +from typing import Any + +import dpath + DOCUMENTATION = r""" --- author: @@ -56,13 +63,6 @@ log_error: true """ -from __future__ import annotations - -import logging -from typing import Any - -import dpath - LOGGER = logging.getLogger(__name__) diff --git a/extensions/eda/plugins/event_filter/json_filter.py b/extensions/eda/plugins/event_filter/json_filter.py index 37830d37..13044f4c 100644 --- a/extensions/eda/plugins/event_filter/json_filter.py +++ b/extensions/eda/plugins/event_filter/json_filter.py @@ -1,3 +1,8 @@ +from __future__ import annotations + +import fnmatch +from typing import Any, Optional + DOCUMENTATION = r""" --- author: @@ -22,11 +27,6 @@ default: null """ -from __future__ import annotations - -import fnmatch -from typing import Any, Optional - def _matches_include_keys(include_keys: list[str], string: str) -> bool: return any(fnmatch.fnmatch(string, pattern) for pattern in include_keys) diff --git a/extensions/eda/plugins/event_filter/noop.py b/extensions/eda/plugins/event_filter/noop.py index 245efe21..e998b490 100644 --- a/extensions/eda/plugins/event_filter/noop.py +++ b/extensions/eda/plugins/event_filter/noop.py @@ -1,3 +1,5 @@ +from typing import Any + DOCUMENTATION = r""" --- author: @@ -7,8 +9,6 @@ - An event filter that does nothing to the input. """ -from typing import Any - def main(event: dict[str, Any]) -> dict[str, Any]: """Return the input.""" diff --git a/extensions/eda/plugins/event_filter/normalize_keys.py b/extensions/eda/plugins/event_filter/normalize_keys.py index 618c8435..2e769b36 100644 --- a/extensions/eda/plugins/event_filter/normalize_keys.py +++ b/extensions/eda/plugins/event_filter/normalize_keys.py @@ -1,3 +1,8 @@ +import logging +import multiprocessing as mp +import re +from typing import Any + DOCUMENTATION = r""" --- author: @@ -37,11 +42,6 @@ overwrite: false """ -import logging -import multiprocessing as mp -import re -from typing import Any - normalize_regex = re.compile("[^0-9a-zA-Z_]+")