Remove str() from call to print()
Documentation Index
Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt
Use this file to discover all available pages before exploring further.
Sourcery refactoring id: remove-str-from-print
Section titled “Sourcery refactoring id: remove-str-from-print”Description:
Section titled “Description:”Removes unnecessary calls to str() from within print()
Before:
Section titled “Before:”print(str(1))After:
Section titled “After:”print(1)Explanation:
Section titled “Explanation:”Objects passed into calls to the print() function already have str() called
on them, so it is not required to do so yourself.