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/performRegionalEventSimulation/regionalGroundMotion/gmpe/openSHAGMPE.py b/modules/performRegionalEventSimulation/regionalGroundMotion/gmpe/openSHAGMPE.py index a83b970f6..69213803e 100644 --- a/modules/performRegionalEventSimulation/regionalGroundMotion/gmpe/openSHAGMPE.py +++ b/modules/performRegionalEventSimulation/regionalGroundMotion/gmpe/openSHAGMPE.py @@ -78,8 +78,12 @@ def setIMT(self, imt): # noqa: N802, D102 # for i in self.supportedImt: # if i is float: # supported_imt.append(i) - supported_imt = [f'SA{x}s' if isinstance(x, float) else x for x in self.supportedImt] - sys.exit(f'The IM type {imt} is not supported by Chiou and Young (2014). \n The supported IM types are {supported_imt}') + supported_imt = [ + f'SA{x}s' if isinstance(x, float) else x for x in self.supportedImt + ] + sys.exit( + f'The IM type {imt} is not supported by Chiou and Young (2014). \n The supported IM types are {supported_imt}' + ) return False self.c1 = self.coeff['c1'][imt] self.c1a = self.coeff['c1a'][imt] @@ -342,7 +346,9 @@ def __init__(self): def setIMT(self, imt): # noqa: N802, D102 if imt not in self.supportedImt: - supported_imt = [f'SA{x}s' if isinstance(x, float) else x for x in self.supportedImt] + supported_imt = [ + f'SA{x}s' if isinstance(x, float) else x for x in self.supportedImt + ] sys.exit( f'The IM type {imt} is not supported by Abrahamson, Silva, and Kamai (2014). \n The supported IM types are {supported_imt}' ) @@ -642,7 +648,9 @@ def __init__(self): def setIMT(self, imt): # noqa: N802, D102 if imt not in self.supportedImt: - supported_imt = [f'SA{x}s' if isinstance(x, float) else x for x in self.supportedImt] + supported_imt = [ + f'SA{x}s' if isinstance(x, float) else x for x in self.supportedImt + ] sys.exit( f'The IM type {imt} is not supported by Boore, Stewart, Seyhan & Atkinson (2014). \n The supported IM types are {supported_imt}' ) @@ -870,7 +878,9 @@ def __init__(self): def setIMT(self, imt): # noqa: N802, D102 if imt not in self.supportedImt: - supported_imt = [f'SA{x}s' if isinstance(x, float) else x for x in self.supportedImt] + supported_imt = [ + f'SA{x}s' if isinstance(x, float) else x for x in self.supportedImt + ] sys.exit( f'The IM type {imt} is not supported by Campbell & Bozorgnia (2014). \n The supported IM types are {supported_imt}' )