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

Use f-strings instead of percent operator or str.format() #6198

Merged
merged 11 commits into from Jul 17, 2023

Conversation

pavoljuhas
Copy link
Collaborator

Convert all % and str.format() expressions or disable pylint
check where str.format() is more readable.

Partially fixes #6171

@CirqBot CirqBot added the size: L 250< lines changed <1000 label Jul 14, 2023
@pavoljuhas pavoljuhas changed the title Use f-strings instead of "%" or str.format() expressions Use f-strings instead of percent or str.format() expressions Jul 15, 2023
@pavoljuhas pavoljuhas changed the title Use f-strings instead of percent or str.format() expressions Use f-strings instead of percent operator or str.format() Jul 17, 2023
@pavoljuhas pavoljuhas marked this pull request as ready for review July 17, 2023 05:11
@pavoljuhas
Copy link
Collaborator Author

The equality of original and new string formatting has been checked by adding assertion checks and printouts in 5ae55fe.
All assertions passed in a locally run pytest and were thereafter removed in 6909b54 and 787b1ff.

@tanujkhattar tanujkhattar enabled auto-merge (squash) July 17, 2023 16:57
@pavoljuhas pavoljuhas disabled auto-merge July 17, 2023 17:27
@pavoljuhas pavoljuhas enabled auto-merge (squash) July 17, 2023 17:28
@pavoljuhas pavoljuhas merged commit 084e273 into quantumlib:master Jul 17, 2023
30 checks passed
@pavoljuhas pavoljuhas deleted the use-f-strings branch July 18, 2023 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: L 250< lines changed <1000
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace flynt checker with pylint consider-using-f-string
3 participants