Return Source statement which contains the given linenumber (counted from 0).
(self, lineno: int)
| 93 | return newsource |
| 94 | |
| 95 | def getstatement(self, lineno: int) -> Source: |
| 96 | """Return Source statement which contains the given linenumber |
| 97 | (counted from 0).""" |
| 98 | start, end = self.getstatementrange(lineno) |
| 99 | return self[start:end] |
| 100 | |
| 101 | def getstatementrange(self, lineno: int) -> tuple[int, int]: |
| 102 | """Return (start, end) tuple which spans the minimal statement region |