From 2d0ef0903537ac030c06df258211d2a9da475584 Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Mon, 16 Oct 2023 12:54:56 +0200 Subject: [PATCH] utils:log,siegfried - format docstring --- acacore/siegfried/siegfried.py | 6 +++--- acacore/utils/log.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/acacore/siegfried/siegfried.py b/acacore/siegfried/siegfried.py index 60468b4..317c3b3 100644 --- a/acacore/siegfried/siegfried.py +++ b/acacore/siegfried/siegfried.py @@ -74,10 +74,10 @@ class Siegfried: def __init__(self, binary: str | PathLike = "sf"): """ Args: - binary: the path to the Siegfried binary, or the program name if it is included in the PATH variable + binary: The path to the Siegfried binary, or the program name if it is included in the PATH variable Raises: - IdentificationError: if Siegfried is not configured properly + IdentificationError: If Siegfried is not configured properly """ self.binary: str = str(binary) _check_process(run([self.binary, "-v"], capture_output=True, encoding="utf-8")) @@ -93,7 +93,7 @@ def identify(self, path: str | PathLike) -> SiegfriedResult: A SiegfriedResult object Raises: - IdentificationError: if there is an error calling Siegfried or processing its results + IdentificationError: If there is an error calling Siegfried or processing its results """ process: CompletedProcess = run( [self.binary, "-json", "-multi", "1024", str(path)], diff --git a/acacore/utils/log.py b/acacore/utils/log.py index c24c33c..4569a8b 100644 --- a/acacore/utils/log.py +++ b/acacore/utils/log.py @@ -11,10 +11,10 @@ def setup_logger(log_name: str, log_path: Path) -> Logger: General method for setting op a log object. Ensures that the different logs we use across tools are standardized. Args: - log_name: the name given to the logger within the logging modules own namespace. All descendant logs needs + log_name: The name given to the logger within the logging modules own namespace. All descendant logs needs to have a name on the form 'log_name.descendant_log_name', which often is the name of the module or submodule that the function is called from. - log_path: the path directly to the log as a `txt` file. If the file is not there, it will be created. + log_path: The path directly to the log as a `txt` file. If the file is not there, it will be created. If it already exists, it will append the messages to the file. Returns: