-
Notifications
You must be signed in to change notification settings - Fork 892
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Python 2-only methods from URLOpen audit
- Loading branch information
1 parent
379b6a7
commit 57fc386
Showing
3 changed files
with
75 additions
and
76 deletions.
There are no files selected for viewing
32 changes: 16 additions & 16 deletions
32
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S310.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
import urllib | ||
import urllib.request | ||
|
||
urllib.urlopen(url='http://www.google.com') | ||
urllib.urlopen(url='http://www.google.com', **kwargs) | ||
urllib.urlopen('http://www.google.com') | ||
urllib.urlopen('file:///foo/bar/baz') | ||
urllib.urlopen(url) | ||
urllib.request.urlopen(url='http://www.google.com') | ||
urllib.request.urlopen(url='http://www.google.com', **kwargs) | ||
urllib.request.urlopen('http://www.google.com') | ||
urllib.request.urlopen('file:///foo/bar/baz') | ||
urllib.request.urlopen(url) | ||
|
||
urllib.Request(url='http://www.google.com', **kwargs) | ||
urllib.Request(url='http://www.google.com') | ||
urllib.Request('http://www.google.com') | ||
urllib.Request('file:///foo/bar/baz') | ||
urllib.Request(url) | ||
urllib.request.Request(url='http://www.google.com', **kwargs) | ||
urllib.request.Request(url='http://www.google.com') | ||
urllib.request.Request('http://www.google.com') | ||
urllib.request.Request('file:///foo/bar/baz') | ||
urllib.request.Request(url) | ||
|
||
urllib.URLopener().open(fullurl='http://www.google.com', **kwargs) | ||
urllib.URLopener().open(fullurl='http://www.google.com') | ||
urllib.URLopener().open('http://www.google.com') | ||
urllib.URLopener().open('file:///foo/bar/baz') | ||
urllib.URLopener().open(url) | ||
urllib.request.URLopener().open(fullurl='http://www.google.com', **kwargs) | ||
urllib.request.URLopener().open(fullurl='http://www.google.com') | ||
urllib.request.URLopener().open('http://www.google.com') | ||
urllib.request.URLopener().open('file:///foo/bar/baz') | ||
urllib.request.URLopener().open(url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters