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: convert string formatting to F-strings #29969

Closed
wants to merge 1 commit into from

Conversation

iw4p
Copy link

@iw4p iw4p commented Apr 26, 2024

All instances of string formatting have been converted to F-strings for increased readability and performance. Before that some of strings use .format and others use f-strings.

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 26, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
Concept NACK stickies-v

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #29971 (refactor: refactored platform assignment into get_platform function by iw4p)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@brunoerg
Copy link
Contributor

brunoerg commented Apr 26, 2024

If this is just a refactor, why the fix: on the commit message (8c600f7)?

@iw4p iw4p force-pushed the enhancement/f-string-formatting branch from 8c600f7 to e779ed3 Compare April 26, 2024 14:25
@iw4p
Copy link
Author

iw4p commented Apr 26, 2024

If this is just a refactor, why the fix: on the commit message (8c600f7)?

Usually the most prefixes are fix and feat, but sometimes some repos and projects use other keywords like chore, ref, etc.
reference.
By the way I modified the commit message prefix.

@fanquake
Copy link
Member

You should read our developer notes for an overview of what is relevant to our project. ref doesn't mean anything here. You could probably use refactor:.

@iw4p iw4p force-pushed the enhancement/f-string-formatting branch from e779ed3 to 36855f2 Compare April 26, 2024 14:34
@iw4p
Copy link
Author

iw4p commented Apr 26, 2024

Sorry, I'm a newbie. I read this and only saw this tagging for PR title. Now I changed it to refactor.

Copy link
Contributor

@stickies-v stickies-v left a comment

Choose a reason for hiding this comment

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

Concept NACK. Thank you for looking into this, and I support increased f-string usage, but imo this should be done organically whenever these lines are touched for other reasons (or with a scripted-diff across the code base, and enforcing it with linter, should there be support to do that). In its current form, this is not worth the review time imo.

@iw4p
Copy link
Author

iw4p commented Apr 30, 2024

Hi,
Thank you.
I touched this file to optimize it like using built-in python request library instead of curl and decreasing the request numbers, and one more PR. That's why I decided to go for converting strings to f-string.

@glozow
Copy link
Member

glozow commented Apr 30, 2024

Thanks for your interest in contributing! CONTRIBUTING.md and developer-notes.md contain good resources for beginners. As we have 300+ pulls open right now, closing this test refactor to focus review attention on the others (see https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#refactoring)

@glozow glozow closed this Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants