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

Refactor code and use the Python 3.6's f-strings for the messages in byexample #153

Open
eldipa opened this issue Mar 23, 2021 · 1 comment
Labels
enhancement something nice to have but it is not neither critical nor urgent good first issue issues that should be easy to get done

Comments

@eldipa
Copy link
Collaborator

eldipa commented Mar 23, 2021

Describe the feature you'd like
Now the byexample dropped support for Python 3.5 we can improve the code using the f-strings that appeared in Python 3.6

For example:

var1 = 12
msg1 = "Message using old C-like style: %s" % var1
msg2 = "Message using old format-like style: {}". format(var1)

Things like that could be written as

msg3 = f"Message using the new f-string style {var1}"

Additional context (optional)
A lot of things will be modified, we need to have small commits and run the tests on each step to make sure that we are not making any mistake.

@eldipa eldipa added enhancement something nice to have but it is not neither critical nor urgent good first issue issues that should be easy to get done labels Mar 23, 2021
@eldipa
Copy link
Collaborator Author

eldipa commented Jan 29, 2022

Take a look to flynt, a tool that automates this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement something nice to have but it is not neither critical nor urgent good first issue issues that should be easy to get done
Projects
None yet
Development

No branches or pull requests

1 participant