MCPcopy Create free account
hub / github.com/PyO3/setuptools-rust / python

Function python

examples/html-py-ever/tests/run_all.py:28–39  ·  view source on GitHub ↗
(filename: str, parser: str)

Source from the content-addressed store, hash-verified

26
27
28def python(filename: str, parser: str) -> Tuple[int, float, float]:
29 start_load = perf_counter()
30 with open(filename, encoding="utf8") as fp:
31 soup = BeautifulSoup(fp, parser)
32
33 end_load = perf_counter()
34 start_search = perf_counter()
35
36 links = soup.select("a[href]")
37 end_search = perf_counter()
38
39 return len(links), end_load - start_load, end_search - start_search
40
41
42def main():

Callers 1

mainFunction · 0.70

Calls 1

selectMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…