Skip to content

Commit

Permalink
address reviewer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Courtney Peverley committed Nov 1, 2023
1 parent ac18c44 commit 9db9477
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 155 deletions.
2 changes: 1 addition & 1 deletion scripts/ddt_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def collect_ddt_fields(self, var_dict, var, run_env,
ntx = context_string(dvar.context)
ctx = context_string(pvar.context)
emsg = f"Attempt to add duplicate DDT sub-variable, {stdname}{ntx}."
emsg += "\nVariable originally defined{ctx}"
emsg += f"\nVariable originally defined{ctx}"
raise CCPPError(emsg.format(stdname, ntx, ctx))
# end if
# Add this intrinsic to <var_dict>
Expand Down
3 changes: 1 addition & 2 deletions scripts/fortran_tools/parse_fortran_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,7 @@ def parse_preamble_data(statements, pobj, spec_name, endmatch, run_env):
raise CCPPError(msg.format(statement, ctx))
# End if
mheaders.append(ddt)
if (run_env.logger and
run_env.debug_on()):
if run_env.debug_on():
ctx = context_string(pobj, nodir=True)
msg = 'Adding DDT {}{}'
run_env.logger.debug(msg.format(ddt.table_name, ctx))
Expand Down
4 changes: 4 additions & 0 deletions scripts/metavar.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,7 @@ def intrinsic_elements(self, check_dict=None, ddt_lib=None):
Currently, an array of DDTs is not processed (return None) since
Fortran does not support a way to reference those elements.
"""
element_names = None
if self.is_ddt():
dtitle = self.get_prop_value('type')
if ddt_lib and (dtitle in ddt_lib):
Expand All @@ -798,6 +799,9 @@ def intrinsic_elements(self, check_dict=None, ddt_lib=None):
if not element_names:
element_names = None
# end if
else:
errmsg = f'No ddt_lib or ddt {dtitle} not in ddt_lib'
raise CCPPError(errmsg)
# end if
# end if
children = self.children()
Expand Down
Loading

0 comments on commit 9db9477

Please sign in to comment.