Skip to content

Commit d668476

Browse files
committed
apply black formatting to FType_MOM_params.py
1 parent 40cb805 commit d668476

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

cime_config/MOM_RPS/FType_MOM_params.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,29 +102,32 @@ def _read_MOM_input(input_path):
102102

103103
return _data
104104

105-
def write(self, output_path, output_format, case=None, def_params=None, inst_suffix=''):
105+
def write(
106+
self, output_path, output_format, case=None, def_params=None, inst_suffix=""
107+
):
106108
if output_format == "MOM_input":
107109
assert case != None, "Must provide a case object to write out MOM_input"
108110
self._write_MOM_input(output_path, case, inst_suffix)
109111
elif output_format == "MOM_override":
110112
assert (
111113
not inst_suffix
112-
), "MOM_override format does not support INST_SUFFIX argument"
114+
), "MOM_override format does not support INST_SUFFIX argument"
113115
assert (
114116
def_params != None
115117
), "Must provide a def_params object to write out MOM_override"
116118
self._write_MOM_override(output_path, def_params)
117119

118-
def _write_MOM_input(self, output_path, case, inst_suffix=''):
120+
def _write_MOM_input(self, output_path, case, inst_suffix=""):
119121
"""writes a MOM_input file from a given json or yaml parameter file in accordance with
120122
the guards and additional parameters that are passed."""
121123

122124
# From the general template (MOM_input.yaml), reduce a custom MOM_input for this case
123125
def expand_func(varname):
124-
if varname == 'INST_SUFFIX':
126+
if varname == "INST_SUFFIX":
125127
return inst_suffix
126128
else:
127129
return case.get_value(varname)
130+
128131
self.reduce(expand_func)
129132

130133
# 2. Now, write MOM_input

0 commit comments

Comments
 (0)