mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	gh-99180: Make StackSummary.should_show_carets private (#119554)
				
					
				
			This commit is contained in:
		
							parent
							
								
									6b6c1a904f
								
							
						
					
					
						commit
						4b7eb321bc
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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 = []
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -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))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue