gh-89412: Add missing attributes (added in 3.10) to traceback module docs (#105046)

This commit is contained in:
Jakub Kuczys 2023-06-05 18:10:13 +02:00 committed by GitHub
parent eb0ce92141
commit a4f72fa39a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 2 deletions

View File

@ -279,6 +279,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.
@ -287,6 +294,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.

View File

@ -674,8 +674,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.
"""

View File

@ -0,0 +1,2 @@
Add missing documentation for the ``end_lineno`` and ``end_offset`` attributes
of the :class:`traceback.TracebackException` class.