-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
help wantedContributions especially welcomeContributions especially welcomeruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
Given this input file (s310_fstring.py):
from urllib.request import urlopen
foo = "foo"
urlopen(f"https://www.example.com/{foo}")Ruff reports a violation of rule S310.
$ ruff check --select S310 --output-format concise s310_fstring.py
s310_fstring.py:3:1: S310 Audit URL open for permitted schemes. Allowing use of `file:` or custom schemes is often unexpected.
Found 1 error.Even though the argument is an f-string, Ruff should be able to detect that it begins with a permitted scheme. Compare #8040.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedContributions especially welcomeContributions especially welcomeruleImplementing or modifying a lint ruleImplementing or modifying a lint rule