MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / unwrap

Function unwrap

tools/python-3.11.9-amd64/Lib/urllib/parse.py:1043–1053  ·  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

1041
1042
1043def unwrap(url):
1044 """Transform a string like '<URL:scheme://host/path>' into 'scheme://host/path'.
1045
1046 The string is returned unchanged if it&#x27;s not a wrapped URL.
1047 """
1048 url = str(url).strip()
1049 if url[:1] == '<' and url[-1:] == '>':
1050 url = url[1:-1].strip()
1051 if url[:4] == 'URL:':
1052 url = url[4:].strip()
1053 return url
1054
1055
1056def splittype(url):

Callers 3

full_urlMethod · 0.90
openMethod · 0.90
retrieveMethod · 0.90

Calls 2

strFunction · 0.85
stripMethod · 0.80

Tested by

no test coverage detected