Semgrep: Python f"..." matches "hello" "world"

Created on 2 May 2020  路  2Comments  路  Source: returntocorp/semgrep

I would expect f"..." to match any f-string, but it also incorrectly matches concatenated normal strings like "hello" "world": https://semgrep.live/n11.

bug external-user python high

Most helpful comment

ok so we want "..." to match regular strings and fstrings, but f"..." to match only fstrings

All 2 comments

Thanks @andersk, this is definitely a fix we'd like to make.

ok so we want "..." to match regular strings and fstrings, but f"..." to match only fstrings

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rttwge picture rttwge  路  5Comments

DrewDennison picture DrewDennison  路  4Comments

dev-zero picture dev-zero  路  4Comments

ajinabraham picture ajinabraham  路  6Comments

Mandawi picture Mandawi  路  4Comments