MCPcopy Create free account
hub / github.com/pytest-dev/pytest / deindent

Method deindent

src/_pytest/_code/source.py:104–108  ·  view source on GitHub ↗

Return a new Source object deindented.

(self)

Source from the content-addressed store, hash-verified

102 return start, end
103
104 def deindent(self) -> "Source":
105 """Return a new Source object deindented."""
106 newsource = Source()
107 newsource.lines[:] = deindent(self.lines)
108 return newsource
109
110 def __str__(self) -> str:
111 return "\n".join(self.lines)

Calls 2

SourceClass · 0.85
deindentFunction · 0.85