From e1cbde7eabded6b7baa399562369929e0f44497f Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Wed, 16 Jul 2025 16:39:11 +0200 Subject: [PATCH] Fix traceback.FrameSummary docstring by adding end_lineno, colno, and end_colno It seems some linters use this information to warn about unknown attributes (We use pyright, pyflakes, and flake8). The explanations are copied from the documentation: https://docs.python.org/3/library/traceback.html#traceback.FrameSummary Signed-off-by: Ole Herman Schumacher Elgesem --- Lib/traceback.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/traceback.py b/Lib/traceback.py index a1f175dbbaa421..31aa8695735f2b 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -287,6 +287,12 @@ class FrameSummary: of code that was running when the frame was captured. - :attr:`locals` Either None if locals were not supplied, or a dict mapping the name to the repr() of the variable. + - :attr:`end_lineno` The last line number of the source code for this frame. + By default, it is set to lineno and indexation starts from 1. + - :attr:`colno` The column number of the source code for this frame. + By default, it is None and indexation starts from 0. + - :attr:`end_colno` The last column number of the source code for this frame. + By default, it is None and indexation starts from 0. """ __slots__ = ('filename', 'lineno', 'end_lineno', 'colno', 'end_colno', pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy