Skip to content

Commit

Permalink
fix broken test due to wrong f-string
Browse files Browse the repository at this point in the history
  • Loading branch information
Arun Persaud committed Oct 26, 2024
1 parent c74d6f2 commit 9ae762c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pymcnp/files/inp/datum.py
Original file line number Diff line number Diff line change
Expand Up @@ -6117,7 +6117,10 @@ def to_mcnp(self) -> str:

if self.comment and isinstance(self.comment, tuple):
if len(self.comment) == len(self.substances):
return f"m{self.suffix.to_mcnp()} {'\n '.join(f'{substance.to_mcnp()} $ {comment}' for substance, comment in zip(self.substances, self.comment))}"
return f'm{self.suffix.to_mcnp()} ' + '\n '.join(
f'{substance.to_mcnp()} $ {comment}'
for substance, comment in zip(self.substances, self.comment)
)
else:
return super().to_mcnp() + ''.join(f' $ {comment}' for comment in self.comments)
else:
Expand Down

0 comments on commit 9ae762c

Please sign in to comment.