Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

f strings instead of string addition for compact readable code #297

Merged
merged 2 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions jade/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,17 +395,7 @@ def check_override_run(self, lib: str, session: Session, exp: bool = False) -> b
logtext = "\nThe following test results have been overwritten:"
for code, test_runned in all_test_runned.items():
for test in test_runned:
logtext = (
logtext
+ "\n"
+ "- "
+ code
+ ": "
+ test
+ " ["
+ lib
+ "]"
)
logtext += f"\n- {code}: {test} [{lib}]"
session.log.adjourn(logtext)
return True

Expand Down
10 changes: 2 additions & 8 deletions jade/utilitiesgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,13 +811,7 @@ def print_XS_EXFOR(session):
bookXS[j][MT] = bookXS[j]["dataT"].reactions[i]
# Don't print if MT is not present in library
except KeyError:
s = (
"Channel MT"
+ str(i)
+ " "
+ "not present in "
+ bookXS[j]["name"]
)
s = f"Channel MT{i} not present in {bookXS[j]['name']}"
print(s)
continue

Expand Down Expand Up @@ -957,7 +951,7 @@ def print_XS_EXFOR(session):
)
plt.savefig(
os.path.join(
session.path_uti, isotope_name + "_" + MT + "_" + "XS" + ".png"
session.path_uti, f"{isotope_name}_{MT}_XS.png"
)
)
print(" Cross Section printed")