Update %-format call to use str.format
See original GitHub issueWhat’s the problem this feature will solve?
Currently in src/pip/_internal/operations/prepare.py
, we use %
-style string formatting.
Describe the solution you’d like
We should use the .format
method for consistency with the rest of the code base.
We should also consider doing the same for the rest of the code base. Whoever takes care of this specific issue should make a general issue for that!
Posted in its original form by @pradyunsg in #6968 (comment)
This issue is a good starting point for anyone who wants to help out with pip’s development – it’s simple and the process of fixing this should be a good introduction to pip’s development workflow.
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (14 by maintainers)
Top Results From Across the Web
Python String Formatting Best Practices
Learn the four main approaches to string formatting in Python, as well as their strengths and weaknesses. You'll also get a simple rule...
Read more >How To Use String Formatters in Python 3 - DigitalOcean
Formatters in Python allow you to use curly braces as placeholders for values that you'll pass through with the str.format() method.
Read more >Python String format() Method - GeeksforGeeks
Python string format() function has been introduced for handling complex string ... The only change is using a colon (:) instead of %....
Read more >Format function in Python - Towards Data Science
Formatters work by fixing one or a lot of replacement fields or placeholders outlined by a pair of curled brackets “{}” — into...
Read more >Python String format() Explain with EXAMPLES - Guru99
Example: Empty Placeholder replaced with a numeric value; Example: Using variable or keyword arguments inside the Placeholder; Example: Using ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The style parameter documented here allows this. But it’s Python 3 only. Can we stop supporting Python 2 now, please? 🙂
Could be related to this issue. I see now these logs on
pip install ...
: