[3.13] gh-99180: Make `StackSummary.should_show_carets` private (GH-119554) (#119556)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Miss Islington (bot) 2024-05-25 19:30:57 +02:00 committed by GitHub
parent 317cc3bcd2
commit 2404cd9460
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -580,7 +580,7 @@ class StackSummary(list):
show_carets = False show_carets = False
with suppress(Exception): with suppress(Exception):
anchors = _extract_caret_anchors_from_line_segment(segment) anchors = _extract_caret_anchors_from_line_segment(segment)
show_carets = self.should_show_carets(start_offset, end_offset, all_lines, anchors) show_carets = self._should_show_carets(start_offset, end_offset, all_lines, anchors)
result = [] result = []
@ -694,7 +694,7 @@ class StackSummary(list):
return ''.join(row) return ''.join(row)
def should_show_carets(self, start_offset, end_offset, all_lines, anchors): def _should_show_carets(self, start_offset, end_offset, all_lines, anchors):
with suppress(SyntaxError, ImportError): with suppress(SyntaxError, ImportError):
import ast import ast
tree = ast.parse('\n'.join(all_lines)) tree = ast.parse('\n'.join(all_lines))