Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-99180: Make StackSummary.should_show_carets private (GH-119554)
(cherry picked from commit 4b7eb32) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
AlexWaygood authored and miss-islington committed May 25, 2024
commit 47494a2a88baf4cd7dedbc1c8b6829096ff92c84
4 changes: 2 additions & 2 deletions Lib/traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ def format_frame_summary(self, frame_summary, **kwargs):
show_carets = False
with suppress(Exception):
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 = []

Expand Down Expand Up @@ -694,7 +694,7 @@ def output_line(lineno):

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):
import ast
tree = ast.parse('\n'.join(all_lines))
Expand Down