Update docstring to reflect current expectation.

This commit is contained in:
Jason R. Coombs 2024-06-06 11:00:31 -04:00
parent 245b0a5def
commit 9df3357ad6
No known key found for this signature in database
GPG Key ID: 708E6CB181B4C47E
1 changed files with 4 additions and 4 deletions

View File

@ -514,11 +514,11 @@ class DoctestModule(Module):
if sys.version_info < (3, 11):
def _find_lineno(self, obj, source_lines):
"""Doctest code does not take into account `@property`, this
is a hackish way to fix it. https://bugs.python.org/issue17446
"""On older Pythons, doctest code does not take into account
`@property`. https://github.com/python/cpython/issues/61648
Wrapped Doctests will need to be unwrapped so the correct
line number is returned. This will be reported upstream. #8796
Moreover, wrapped Doctests need to be unwrapped so the correct
line number is returned. #8796
"""
if isinstance(obj, property):
obj = getattr(obj, "fget", obj)