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

Update Python scripts to Python3 #204

Merged
merged 3 commits into from
Sep 22, 2021
Merged

Update Python scripts to Python3 #204

merged 3 commits into from
Sep 22, 2021

Conversation

graeme-a-stewart
Copy link
Member

Change from the Python2/3 compatible scripts to ones that
use Python3 features (mainly use of Python f-strings, which are
faster and easier to understand).

Fix the precook_test.py script with a shebang.

Scripts were re-blacked as well.

Closes #202

Change from the Python2/3 compatible scripts to ones that
use Python3 features (mainly use of Python f-strings, which are
faster and easier to understand).

Fix the precook_test.py script with a shebang.
Black doesn't split long strings - this has to be done
"by hand".

Fixed a missing f-string indicator
Copy link
Collaborator

@amete amete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @graeme-a-stewart. Your changes look good to me, modulo two typos.

package/scripts/prmon_plot.py Outdated Show resolved Hide resolved
package/scripts/prmon_plot.py Outdated Show resolved Hide resolved
Co-authored-by: Alaettin Serhan Mete <serhanmete@gmail.com>
@graeme-a-stewart
Copy link
Member Author

Thanks a lot @graeme-a-stewart. Your changes look good to me, modulo two typos.

Thanks for spotting those (it's an annoyingly manual process - I didn't find a tool that would do it)

@amete
Copy link
Collaborator

amete commented Sep 22, 2021

Thanks a lot @graeme-a-stewart. Your changes look good to me, modulo two typos.

Thanks for spotting those (it's an annoyingly manual process - I didn't find a tool that would do it)

It seems as if there is a tool called flynt that does this but I haven't used it myself.

@amete amete self-requested a review September 22, 2021 14:19
@amete amete merged commit 057e268 into main Sep 22, 2021
@amete amete deleted the py3scripts branch September 22, 2021 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Python to be more Python3 native
2 participants