github / github/codeql

Too many arguments for string format. - false positive

Open
#8,070 1 comment 0 reactions 0 assignees View on GitHub
false-positive Python
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

**Description of the false positive**

The format string in the following code snippet is flagged, but is valid python code. There is even a similar example in the [python docs](https://docs.python.org/3/library/string.html#format-examples):

```py
def int_formatter(val, chars, delta, left):
return '{:{}{}}'.format(int(val), '<' if left else '>', chars)
```

**URL to the alert on the project page on LGTM.com**

https://lgtm.com/projects/g/tammoippen/plotille/snapshot/74aed13cb730bbfe2f6800352c6c52298823ea05/files/examples/logo_example.py?sort=name&dir=ASC&mode=heatmap#xda5b6013af34ebb6:1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.