-
Notifications
You must be signed in to change notification settings - Fork 90
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
switch to using format string in prim logging #161
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, added a few nitpicks.
It looks Flynt didn't catch all the strings that could be replaced with f-strings in #113. I might check this manually again sometime.
ema_workbench/analysis/prim.py
Outdated
( | ||
"{} dropped from analysis " "because only a single category" | ||
).format(column) | ||
f"{column} dropped from analysis " "because only a single category" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think both the break in stings " "
could be removed, as well as the extra set of parentheses.
ema_workbench/analysis/prim.py
Outdated
( | ||
"box does not meet threshold criteria, " | ||
"value is {}, returning dump box" | ||
).format(box.mean) | ||
f"value is {box.mean}, returning dump box" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this also fit on a single line? If yes, same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some lines could indeed be reduced, see the latest commit. I already ran black on the file as well.
The main purpose is to fix #155 but I used this as an excuse to modify other logging message to switch to using format strings as well
The main purpose is to fix #155 but I used this as an excuse to modify other logging message to switch to using format strings as well