MCPcopy
hub / github.com/pytest-dev/pytest / deindent

Method deindent

src/_pytest/_code/source.py:109–114  ·  view source on GitHub ↗

Return a new Source object deindented.

(self)

Source from the content-addressed store, hash-verified

107 return start, end
108
109 def deindent(self) -> Source:
110 """Return a new Source object deindented."""
111 newsource = Source()
112 newsource.lines[:] = deindent(self.lines)
113 newsource.raw_lines = self.raw_lines
114 return newsource
115
116 def __str__(self) -> str:
117 return "\n".join(self.lines)

Calls 2

SourceClass · 0.85
deindentFunction · 0.85