Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit443b934

Browse files
chore: remove unused function sanitize_parameters()
The function sanitize_parameters() was used when the v3 API was inuse. Since v3 API support has been removed there are no more users ofthis function.
1 parent916a7fe commit443b934

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

‎gitlab/tests/test_utils.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,3 @@ def test_sanitized_url():
4040
src="http://localhost/foo.bar.baz"
4141
dest="http://localhost/foo%2Ebar%2Ebaz"
4242
assertdest==utils.sanitized_url(src)
43-
44-
45-
deftest_sanitize_parameters_does_nothing():
46-
assert1==utils.sanitize_parameters(1)
47-
assert1.5==utils.sanitize_parameters(1.5)
48-
assert"foo"==utils.sanitize_parameters("foo")
49-
50-
51-
deftest_sanitize_parameters_slash():
52-
assert"foo%2Fbar"==utils.sanitize_parameters("foo/bar")
53-
54-
55-
deftest_sanitize_parameters_slash_and_percent():
56-
assert"foo%2Fbar%25quuz"==utils.sanitize_parameters("foo/bar%quuz")
57-
58-
59-
deftest_sanitize_parameters_dict():
60-
source= {"url":"foo/bar","id":1}
61-
expected= {"url":"foo%2Fbar","id":1}
62-
assertexpected==utils.sanitize_parameters(source)

‎gitlab/utils.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,6 @@ def clean_str_id(id: str) -> str:
6060
returnquote(id,safe="")
6161

6262

63-
defsanitize_parameters(value):
64-
ifisinstance(value,dict):
65-
returndict((k,sanitize_parameters(v))fork,vinvalue.items())
66-
ifisinstance(value,str):
67-
returnquote(value,safe="")
68-
returnvalue
69-
70-
7163
defsanitized_url(url:str)->str:
7264
parsed=urlparse(url)
7365
new_path=parsed.path.replace(".","%2E")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp