MCPcopy Create free account
hub / github.com/bpython/bpython / tab_to_space

Function tab_to_space

bpython/curtsiesfrontend/preprocess.py:44–45  ·  view source on GitHub ↗
(m: Match[str])

Source from the content-addressed store, hash-verified

42
43def leading_tabs_to_spaces(s: str) -> str:
44 def tab_to_space(m: Match[str]) -> str:
45 return len(m.group()) * 4 * " "
46
47 return "\n".join(
48 tabs_to_spaces_re.sub(tab_to_space, line) for line in s.split("\n")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected