]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-99180: Make `StackSummary.should_show_carets` private (#119554)
authorAlex Waygood <Alex.Waygood@Gmail.com>
Sat, 25 May 2024 17:08:32 +0000 (18:08 +0100)
committerGitHub <noreply@github.com>
Sat, 25 May 2024 17:08:32 +0000 (17:08 +0000)
Lib/traceback.py

index 280d92d04cac9b4c61abbb5ecaeddb23071880a1..6ee1a50ca6804a22b213b24e6ad8bca46efb3a46 100644 (file)
@@ -580,7 +580,7 @@ class StackSummary(list):
                 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 = []
 
@@ -694,7 +694,7 @@ class StackSummary(list):
 
         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))