[pylint]: bad-string-format-type (#2572)

This commit is contained in:
Colin Delahunty 2023-02-09 20:08:56 -05:00 committed by GitHub
parent 417fe4355f
commit 48daa0f0ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 1239 additions and 2 deletions

View file

@ -0,0 +1,20 @@
# bad-string-format-type (PLE1307)
Derived from the **Pylint** linter.
### What it does
Checks for mismatched argument types in "old-style" format strings.
### Why is this bad?
The format string is not checked at compile time, so it is easy to
introduce bugs by mistyping the format string.
### Example
```python
print("%d" % "1")
```
Use instead:
```python
print("%d" % 1)
```