From 801e5b2725a73ebb680b72e53e7abae8e003d1b8 Mon Sep 17 00:00:00 2001 From: Boaz Haim Date: Sun, 1 Sep 2024 19:35:53 +0300 Subject: [PATCH] pylint --- .github/workflows/ufm_log_analyzer_ci_workflow.yml | 4 ++-- .../src/loganalyze/log_analyzer.py | 8 ++++++-- .../loganalyze/log_analyzers/link_flapping_analyzer.py | 2 +- .../src/loganalyze/log_analyzers/rest_api_log_analyzer.py | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ufm_log_analyzer_ci_workflow.yml b/.github/workflows/ufm_log_analyzer_ci_workflow.yml index 42f4603a..f35edcdb 100644 --- a/.github/workflows/ufm_log_analyzer_ci_workflow.yml +++ b/.github/workflows/ufm_log_analyzer_ci_workflow.yml @@ -12,10 +12,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: '3.9' diff --git a/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzer.py b/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzer.py index 766b7bd7..cc40e873 100755 --- a/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzer.py +++ b/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzer.py @@ -330,8 +330,12 @@ def create_analyzer(parsed_args, full_extracted_logs_list, rest_api_log_analyzer = partial_create_analyzer(log_name="rest_api.log", analyzer_clc=RestApiAnalyzer) - second_telemetry_sampled_csv = get_files_in_dest_by_type(args.destination, "secondary_", 1000, "gz") - links_flapping_analyzer = LinkFlappingAnalyzer(second_telemetry_sampled_csv, args.destination) + second_telemetry_sampled_csv = get_files_in_dest_by_type(args.destination, + "secondary_", + 1000, + "gz") + links_flapping_analyzer = LinkFlappingAnalyzer(second_telemetry_sampled_csv, + args.destination) ufm_top_analyzer.add_analyzer(links_flapping_analyzer) end = time.perf_counter() log.LOGGER.debug(f"Took {end-start:.3f} to load the parsed data") diff --git a/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/link_flapping_analyzer.py b/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/link_flapping_analyzer.py index 420e39f2..ac54c71b 100644 --- a/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/link_flapping_analyzer.py +++ b/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/link_flapping_analyzer.py @@ -17,9 +17,9 @@ import shutil from typing import List import pandas as pd +from utils.netfix.link_flapping import get_link_flapping from loganalyze.log_analyzers.base_analyzer import BaseImageCreator import loganalyze.logger as log -from utils.netfix.link_flapping import get_link_flapping FILE_NAME_PATTERN=r"^secondary_(5m|1h|1d|1w)_(\d{14})\.gz$" TIME_PATTERN="%Y%m%d%H%M%S" diff --git a/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/rest_api_log_analyzer.py b/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/rest_api_log_analyzer.py index caaf06f5..0edeed62 100644 --- a/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/rest_api_log_analyzer.py +++ b/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/rest_api_log_analyzer.py @@ -10,9 +10,9 @@ # from typing import List from urllib.parse import urlparse -from loganalyze.log_analyzers.base_analyzer import BaseAnalyzer import pandas as pd import numpy as np +from loganalyze.log_analyzers.base_analyzer import BaseAnalyzer class RestApiAnalyzer(BaseAnalyzer):