From 62cf6be3ba95911504c69b73ef99aab11697ffe8 Mon Sep 17 00:00:00 2001 From: John Vouvakis Manousakis Date: Wed, 28 Aug 2024 05:08:16 -0700 Subject: [PATCH] Format and lint --- modules/Workflow/createResponseCSV.py | 14 +++++++------- modules/performUQ/common/parallel_runner_mpi4py.py | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/Workflow/createResponseCSV.py b/modules/Workflow/createResponseCSV.py index e553398c3..557b14c80 100644 --- a/modules/Workflow/createResponseCSV.py +++ b/modules/Workflow/createResponseCSV.py @@ -1,4 +1,4 @@ -# noqa: D100 +# noqa: D100, INP001 # # Code to write response.csv file given input and dakotaTab.out files @@ -14,9 +14,9 @@ import numpy as np import pandas as pd -def main(input_file, dakota_tab_file): # noqa: D103 - directory_inputs = os.path.dirname(input_file) # noqa: PTH120 +def main(input_file, dakota_tab_file): # noqa: D103 + directory_inputs = os.path.dirname(input_file) # noqa: PTH120 os.chdir(directory_inputs) try: @@ -26,11 +26,11 @@ def main(input_file, dakota_tab_file): # noqa: D103 except FileNotFoundError: # Handle the error if the file is not found - print(f"Error createResponseCSV.py: The file '{input_file}' was not found.") # noqa: T201 + print(f"Error createResponseCSV.py: The file '{input_file}' was not found.") # noqa: T201 return except OSError: # Handle other I/O errors - print(f"Error createResponseCSV.py: Error reading the file '{input_file}'.") # noqa: T201 + print(f"Error createResponseCSV.py: Error reading the file '{input_file}'.") # noqa: T201 return app_data = data.get('Applications', None) @@ -59,12 +59,12 @@ def main(input_file, dakota_tab_file): # noqa: D103 except FileNotFoundError: # Handle the error if the file is not found - print(f"Error createResponseCSV.py: The file '{dakota_tab_file}' not found.") # noqa: T201 + print(f"Error createResponseCSV.py: The file '{dakota_tab_file}' not found.") # noqa: T201 return except OSError: # Handle other I/O errors - print(f"Error createResponseCSV.py: Error reading '{dakota_tab_file}'.") # noqa: T201 + print(f"Error createResponseCSV.py: Error reading '{dakota_tab_file}'.") # noqa: T201 return diff --git a/modules/performUQ/common/parallel_runner_mpi4py.py b/modules/performUQ/common/parallel_runner_mpi4py.py index 64bbb4a6d..bf8de20bc 100644 --- a/modules/performUQ/common/parallel_runner_mpi4py.py +++ b/modules/performUQ/common/parallel_runner_mpi4py.py @@ -1,6 +1,7 @@ from mpi4py import MPI # noqa: INP001, D100 from mpi4py.futures import MPIPoolExecutor + class ParallelRunnerMPI4PY: # noqa: D101 def __init__(self, run_type: str = 'runningRemote') -> None: self.run_type = run_type