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

Method _check_url

Lib/webbrowser.py:167–170  ·  view source on GitHub ↗

Ensures that the URL is safe to pass to subprocesses as a parameter

(url)

Source from the content-addressed store, hash-verified

165
166 @staticmethod
167 def _check_url(url):
168 """Ensures that the URL is safe to pass to subprocesses as a parameter"""
169 if url and url.lstrip().startswith("-"):
170 raise ValueError(f"Invalid URL (leading dash disallowed): {url!r}")
171
172
173class GenericBrowser(BaseBrowser):

Callers 7

openMethod · 0.80
openMethod · 0.80
openMethod · 0.80
openMethod · 0.80
openMethod · 0.80
openMethod · 0.80
openMethod · 0.80

Calls 2

startswithMethod · 0.45
lstripMethod · 0.45

Tested by

no test coverage detected