github / github/codeql

LGTM.com - false positive - Python: Wrong number of arguments for format

Aberta
#3,970 2 comentários 0 reações 0 responsáveis Ver no GitHub
false-positive Python
Linguagem predominante
CodeQL
Estrelas
10.1k
Forks
2.1k
Merge médio
2d 15h
PRs com merge (30d)
141

Descrição

**Description of the false positive**

In multiple places, constructs such as `var = '[0:%s]' % (cols)` and `print("\n%d files:" % len(filenames))` raise alert of type [Wrong number of arguments for format](https://lgtm.com/rules/2970098/).

I believe this may be caused by an incorrect interpretation of the parens where `(5)` is considered to be a singleton tuple whereas it should be `(5,)` however I am not sure if this is it.

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

https://lgtm.com/projects/g/JetBrains/intellij-community/snapshot/4142f5da479541c769625ab66eeadcbb03e4211b/files/python/helpers/pydev/_pydevd_bundle/pydevd_vars.py?sort=name&dir=ASC&mode=heatmap#xc5d0fd0dff6372d9:1

https://lgtm.com/projects/g/JetBrains/intellij-community/snapshot/4142f5da479541c769625ab66eeadcbb03e4211b/files/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py#xa38757d85e31d8b0:1

https://lgtm.com/projects/g/JetBrains/intellij-community/snapshot/4142f5da479541c769625ab66eeadcbb03e4211b/files/python/helpers/coveragepy/coverage/cmdline.py#xa8bd8b0e65e16629:1

@RasmusSemmle @RasmusWL

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.