Skip to content

Commit

Permalink
more pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
boazhaim committed Nov 6, 2024
1 parent c6ca328 commit 536c8ca
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions plugins/ufm_log_analyzer_plugin/src/loganalyze/.pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ disable=missing-function-docstring,
missing-module-docstring,
too-few-public-methods,
logging-fstring-interpolation,

[DESIGN]
max-locals=20
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def full_analysis(self):
class_name = ""
if "." in func.__qualname__:
class_name = func.__qualname__.split('.')[0]
log.logging.DEBUG(f"Error when calling {function_name} {class_name}, skipping")
log.LOGGER.debug(f"Error when calling {function_name} {class_name}, skipping")
except:
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ def extract_files(self, files_to_extract: List[str],
for file_name in files:
full_dir_name = os.path.dirname(file_name)
last_dir_name = os.path.basename(full_dir_name)
is_logs_with_dir_flag = last_dir_name in logs_with_dirs and file_name in logs_with_dirs[last_dir_name]
is_logs_with_dir_flag = last_dir_name in logs_with_dirs and \
file_name in logs_with_dirs[last_dir_name]
if file_name in files_to_extract or last_dir_name in directories_to_extract or\
is_logs_with_dir_flag:
src_file_path = os.path.join(root, file_name)
new_file_name = f"{last_dir_name}_{file_name}" if is_logs_with_dir_flag else file_name
new_file_name = f"{last_dir_name}_{file_name}" if is_logs_with_dir_flag \
else file_name
dest_file_path = os.path.join(destination, new_file_name)
shutil.copy2(src_file_path, dest_file_path)
found_files.add(dest_file_path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from tarfile import TarFile
import tarfile
import os
from typing import List, Set, Tuple
from typing import List, Set

from loganalyze.logs_extraction.base_extractor import BaseExtractor
from loganalyze.utils.common import delete_folders
Expand Down

0 comments on commit 536c8ca

Please sign in to comment.