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: Leverage f-string instead of format #5193

Open
SMoraisAnsys opened this issue Sep 23, 2024 · 0 comments
Open

REFACTOR: Leverage f-string instead of format #5193

SMoraisAnsys opened this issue Sep 23, 2024 · 0 comments
Labels
good first issue Easy to solve for newcomers

Comments

@SMoraisAnsys
Copy link
Collaborator

We have deprecated IronPython so we should be able to use f-strings instead of working with format or strings addition.

For example

var = "dummy"

# Use f-strings
print(f"This is my value: {var} !")

# Remove code with format or string addition
print(f"This is my value: {} !".format(var))
print(f"This is my value: + var + " !")

Updating this will improve readability and follow the push from the Python ecosystem.
This should be a good entry point for new contributors.

@SMoraisAnsys SMoraisAnsys added the good first issue Easy to solve for newcomers label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Easy to solve for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant