MCPcopy
hub / github.com/smittix/intercept / _clean_string

Function _clean_string

tests/test_requirements.py:12–14  ·  view source on GitHub ↗

Normalizes a requirement string (lowercase and removes spaces).

(req)

Source from the content-addressed store, hash-verified

10 return Path(__file__).parent.parent
11
12def _clean_string(req):
13 """Normalizes a requirement string (lowercase and removes spaces)."""
14 return req.strip().lower().replace(" ", "")
15
16def parse_txt_requirements(file_path):
17 """Extracts full requirement strings (name + version) from a .txt file."""

Callers 2

parse_txt_requirementsFunction · 0.85
parse_toml_sectionFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected