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

change 2 command, use formating literals #404

Merged
merged 3 commits into from
Jun 10, 2024
Merged

change 2 command, use formating literals #404

merged 3 commits into from
Jun 10, 2024

Conversation

ArtemIsmagilov
Copy link
Contributor

I try rewrite cmd(s). this optional code maybe easier to read and work.

@Dreamsorcerer
Copy link
Member

Same as the previous one, I'm not convinced this is an improvement when using legacy % string formatting with nested f-string formatting.

@ArtemIsmagilov
Copy link
Contributor Author

ArtemIsmagilov commented Jun 9, 2024

@Dreamsorcerer. About this PR answered in #403. This is apparently a matter of preference code. Even considering that literals themselves are faster than methods and loops, this has absolutely nothing to do with our args. Therefore, this is only a point of view on formating. You can cancel this PR because it does not correspond to the vision of the future project. Thank you for leaving a comment.

@ArtemIsmagilov
Copy link
Contributor Author

To be honest, we usually use join when we don't know how many arguments need to be converted into a byte string. however, in our case, the rigid argument notation fits very well here.

@ArtemIsmagilov
Copy link
Contributor Author

After reading this pep, we can only suggest rewriting it with %b since this is a specification for python3. https://peps.python.org/pep-0461/#interpolation

@Dreamsorcerer
Copy link
Member

After reading this pep, we can only suggest rewriting it with %b since this is a specification for python3. https://peps.python.org/pep-0461/#interpolation

Yep, just what I said on the other PR, as I saw an update there first.

@ArtemIsmagilov
Copy link
Contributor Author

After reading this pep, we can only suggest rewriting it with %b since this is a specification for python3. https://peps.python.org/pep-0461/#interpolation

Yep, just what I said on the other PR, as I saw an update there first.

Great, then I'll redo the PR. Thank you.

@Dreamsorcerer Dreamsorcerer enabled auto-merge (squash) June 10, 2024 20:55
@Dreamsorcerer Dreamsorcerer merged commit 2a2c60d into aio-libs:master Jun 10, 2024
10 checks passed
Copy link
Contributor Author

@ArtemIsmagilov ArtemIsmagilov left a comment

Choose a reason for hiding this comment

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

cool)

@ArtemIsmagilov ArtemIsmagilov deleted the make-cmd-more-readable branch June 10, 2024 20:57
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.

2 participants