Return a copy of the source object with all lines indented by the given indent-string.
(self, indent: str = " " * 4)
| 81 | return source |
| 82 | |
| 83 | def indent(self, indent: str = " " * 4) -> "Source": |
| 84 | """Return a copy of the source object with all lines indented by the |
| 85 | given indent-string.""" |
| 86 | newsource = Source() |
| 87 | newsource.lines = [(indent + line) for line in self.lines] |
| 88 | return newsource |
| 89 | |
| 90 | def getstatement(self, lineno: int) -> "Source": |
| 91 | """Return Source statement which contains the given linenumber |