LGTM.com - false positive - Python: Wrong number of arguments for format
- Vorherrschende Sprache
- CodeQL
- Sterne
- 10.1k
- Forks
- 2.1k
- Ø Merge
- 2 T. 15 Std.
- Gemergte PRs (30 T.)
- 141
Beschreibung
**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
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.