Skip to content

Files

Latest commit

 

History

History
19 lines (12 loc) · 325 Bytes

misplaced-format-function.md

File metadata and controls

19 lines (12 loc) · 325 Bytes

Pattern: Use of format() on non-str object

Issue: -

Description

Emitted when format() is not called on str object. This might not be what you intended to do.

Example of incorrect code:

print("value: {}").format(123)

Example of correct code:

print("value: {}".format(123))