Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
shimwell committed Apr 30, 2024
1 parent 37092cf commit a61cb4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/geouned/GEOUNED/Write/WriteFiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ def writeGeometry(UniverseBox, MetaList, Surfaces, code_setting):
# Currently there are two was of setting outFormat (via a .set method and
# a class attribute. Once we have a single method then move this validating
# input code to the attribute @setter
supported_mc_codes = ('mcnp', 'openMC_XML', 'openMC_PY', 'serpent', 'phits')
for out_format in code_setting['outFormat']:
supported_mc_codes = ("mcnp", "openMC_XML", "openMC_PY", "serpent", "phits")
for out_format in code_setting["outFormat"]:
if out_format not in supported_mc_codes:
msg = f'outFormat {out_format} not in supported MC codes ({supported_mc_codes})'
msg = f"outFormat {out_format} not in supported MC codes ({supported_mc_codes})"
raise ValueError(msg)

# write cells comments in file
Expand Down
6 changes: 3 additions & 3 deletions tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def test_conversion(input_step_file):
}

# deletes the output MC files if they already exists
suffixes = ('.mcnp', '.xml', '.inp', '.py', '.serp')
suffixes = (".mcnp", ".xml", ".inp", ".py", ".serp")
for suffix in suffixes:
output_filename_stem.with_suffix(suffix).unlink(missing_ok=True)
output_filename_stem.with_suffix(suffix).unlink(missing_ok=True)

GEO = CadToCsg("Input Test")

Expand All @@ -53,4 +53,4 @@ def test_conversion(input_step_file):
GEO.Start()

for suffix in suffixes:
assert output_filename_stem.with_suffix(suffix).exists()
assert output_filename_stem.with_suffix(suffix).exists()

0 comments on commit a61cb4d

Please sign in to comment.