MCPcopy Create free account
hub / github.com/NVIDIA/SkillEvaluator / _https_url

Function _https_url

ci/request_gitlab_feedback.py:46–61  ·  view source on GitHub ↗
(value: str)

Source from the content-addressed store, hash-verified

44
45
46def _https_url(value: str):
47 if not value or any(ord(character) <= 32 or ord(character) == 127 for character in value):
48 raise ValueError("Invalid API origin")
49 parsed = urllib.parse.urlsplit(value)
50 if (
51 parsed.scheme != "https"
52 or not parsed.hostname
53 or parsed.username
54 or parsed.password
55 or parsed.query
56 or parsed.fragment
57 or "\\" in value
58 ):
59 raise ValueError("Invalid API origin")
60 _ = parsed.port
61 return parsed
62
63
64def _configuration(env: Mapping[str, str]) -> tuple[str, int, str, str, str]:

Callers 1

_configurationFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected