MCPcopy Index your code
hub / github.com/python/cpython / unwrap

Function unwrap

Lib/urllib/parse.py:1223–1233  ·  view source on GitHub ↗

Transform a string like ' ' into 'scheme://host/path'. The string is returned unchanged if it's not a wrapped URL.

(url)

Source from the content-addressed store, hash-verified

1221
1222
1223def unwrap(url):
1224 """Transform a string like '<URL:scheme://host/path>' into 'scheme://host/path'.
1225
1226 The string is returned unchanged if it&#x27;s not a wrapped URL.
1227 """
1228 url = str(url).strip()
1229 if url[:1] == '<' and url[-1:] == '>':
1230 url = url[1:-1].strip()
1231 if url[:4] == 'URL:':
1232 url = url[4:].strip()
1233 return url
1234
1235
1236def splittype(url):

Callers 1

full_urlMethod · 0.90

Calls 2

strFunction · 0.85
stripMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…