MCPcopy Index your code
hub / github.com/RustPython/RustPython / expand_tabs

Method expand_tabs

Lib/difflib.py:1758–1766  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

1756 characters will be replaced with a nonbreakable space.
1757 """
1758 def expand_tabs(line):
1759 # hide real spaces
1760 line = line.replace(' ','\0')
1761 # expand tabs into spaces
1762 line = line.expandtabs(self._tabsize)
1763 # replace spaces from expanded tabs back into tab characters
1764 # (we'll replace them with markup after we do differencing)
1765 line = line.replace(' ','\t')
1766 return line.replace('\0',' ').rstrip('\n')
1767 fromlines = [expand_tabs(line) for line in fromlines]
1768 tolines = [expand_tabs(line) for line in tolines]
1769 return fromlines,tolines

Callers

nothing calls this directly

Calls 3

replaceMethod · 0.45
expandtabsMethod · 0.45
rstripMethod · 0.45

Tested by

no test coverage detected