mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
[3.11] gh-89412: Add missing attributes (added in 3.10) to traceback module docs (GH-105046) (#105328)
(cherry picked from commit a4f72fa39a)
Co-authored-by: Jakub Kuczys <me@jacken.men>
This commit is contained in:
parent
93d9e990fb
commit
faae548e0e
3 changed files with 18 additions and 2 deletions
|
|
@ -280,6 +280,13 @@ capture data for later printing in a lightweight fashion.
|
|||
|
||||
For syntax errors - the line number where the error occurred.
|
||||
|
||||
.. attribute:: end_lineno
|
||||
|
||||
For syntax errors - the end line number where the error occurred.
|
||||
Can be ``None`` if not present.
|
||||
|
||||
.. versionadded:: 3.10
|
||||
|
||||
.. attribute:: text
|
||||
|
||||
For syntax errors - the text where the error occurred.
|
||||
|
|
@ -288,6 +295,13 @@ capture data for later printing in a lightweight fashion.
|
|||
|
||||
For syntax errors - the offset into the text where the error occurred.
|
||||
|
||||
.. attribute:: end_offset
|
||||
|
||||
For syntax errors - the end offset into the text where the error occurred.
|
||||
Can be ``None`` if not present.
|
||||
|
||||
.. versionadded:: 3.10
|
||||
|
||||
.. attribute:: msg
|
||||
|
||||
For syntax errors - the compiler error message.
|
||||
|
|
|
|||
|
|
@ -669,8 +669,8 @@ class TracebackException:
|
|||
occurred.
|
||||
- :attr:`offset` For syntax errors - the offset into the text where the
|
||||
error occurred.
|
||||
- :attr:`end_offset` For syntax errors - the offset into the text where the
|
||||
error occurred. Can be `None` if not present.
|
||||
- :attr:`end_offset` For syntax errors - the end offset into the text where
|
||||
the error occurred. Can be `None` if not present.
|
||||
- :attr:`msg` For syntax errors - the compiler error message.
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
Add missing documentation for the ``end_lineno`` and ``end_offset`` attributes
|
||||
of the :class:`traceback.TracebackException` class.
|
||||
Loading…
Add table
Add a link
Reference in a new issue