From e02a43ca5a51b12a12c57f7b397782839b6e97b1 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 8 Dec 2023 03:48:17 +0000 Subject: [PATCH 1/2] refactor: remove unnecessary f-string It is wasteful to use `f-string` mechanism if there are no expressions to be extrapolated. It is recommended to use regular strings instead. --- src/quacc/schemas/vasp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/quacc/schemas/vasp.py b/src/quacc/schemas/vasp.py index 7bc4bd72d1..47c0c0b4a7 100644 --- a/src/quacc/schemas/vasp.py +++ b/src/quacc/schemas/vasp.py @@ -98,7 +98,7 @@ def vasp_summarize_run( bader_results = _bader_runner(dir_path, structure=struct) except Exception as err: bader_results = None - logging.warning(f"Bader analysis could not be performed.", exc_info=True) + logging.warning("Bader analysis could not be performed.", exc_info=True) if bader_results: vasp_task_doc["bader"] = bader_results[0] @@ -111,7 +111,7 @@ def vasp_summarize_run( except Exception as err: chargemol_results = None logging.warning( - f"Chargemol analysis could not be performed.", exc_info=True + "Chargemol analysis could not be performed.", exc_info=True ) if chargemol_results: From 03692f54734b3fcf8a0aa8ea64371f93a3494d20 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 8 Dec 2023 03:48:30 +0000 Subject: [PATCH 2/2] style: format code with Black, isort and Prettier This commit fixes the style issues introduced in e02a43c according to the output from Black, isort and Prettier. Details: https://github.com/Quantum-Accelerators/quacc/pull/1318 --- src/quacc/schemas/vasp.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/quacc/schemas/vasp.py b/src/quacc/schemas/vasp.py index 47c0c0b4a7..50b20137b1 100644 --- a/src/quacc/schemas/vasp.py +++ b/src/quacc/schemas/vasp.py @@ -110,9 +110,7 @@ def vasp_summarize_run( chargemol_results = _chargemol_runner(dir_path, structure=struct) except Exception as err: chargemol_results = None - logging.warning( - "Chargemol analysis could not be performed.", exc_info=True - ) + logging.warning("Chargemol analysis could not be performed.", exc_info=True) if chargemol_results: vasp_task_doc["chargemol"] = chargemol_results[0]