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

Formatting: string interpolation #365

Merged
merged 3 commits into from
Jul 24, 2019

Conversation

Glutexo
Copy link
Collaborator

@Glutexo Glutexo commented Jul 22, 2019

Unified all string interpolations.

  • Log messages use the logging module’s native % interpolation, receiving the values as position arguments.
  • String literals use f-strings instead of the % operator and the str.format method.

This is a part of making the code clean and nicely formatted. #335

Replaced all %-interpolated strings with f-strings. This is what
Pyupgrade does.
Replaced all str.format string interpolation method calls with
f-strings. This unifies the interpolation with the former % expressions
that were replaced by f-strings too.
Utilize logging module native string interpolation by %-tags. Coverted
all log calls formatted by f-strings to this format.
@Glutexo Glutexo mentioned this pull request Jul 22, 2019
@Glutexo
Copy link
Collaborator Author

Glutexo commented Jul 24, 2019

This pull request has been approved. Can we merge it?

@dehort dehort merged commit c26ad4c into RedHatInsights:master Jul 24, 2019
@Glutexo Glutexo deleted the string_interpolation branch July 25, 2019 07:07
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.

3 participants