(self)
| 497 | return True |
| 498 | |
| 499 | def get_indent_spaces(self): |
| 500 | sourcefor, n = self._indent_spaces_cache |
| 501 | if sourcefor == self.source: |
| 502 | return n |
| 503 | |
| 504 | # self.source always has a trailing newline |
| 505 | n = find_next_indent(self.source[:-1]) |
| 506 | self._indent_spaces_cache = (self.source, n) |
| 507 | return n |
| 508 | |
| 509 | # Backwards compatibility. I think all code that used .indent_spaces was |
| 510 | # inside IPython, but we can leave this here until IPython 7 in case any |