PR suggestions

This commit is contained in:
Tyler Smart 2023-08-19 22:20:40 -06:00
parent ebd571bb18
commit 7a625481da
1 changed files with 12 additions and 10 deletions

View File

@ -537,8 +537,10 @@ class DoctestModule(Module):
tests, obj, name, module, source_lines, globs, seen tests, obj, name, module, source_lines, globs, seen
) )
if sys.version_info < (3, 13):
def _from_module(self, module, object): def _from_module(self, module, object):
"""`cached_property` objects will are never considered a part """`cached_property` objects are never considered a part
of the 'current module'. As such they are skipped by doctest. of the 'current module'. As such they are skipped by doctest.
Here we override `_from_module` to check the underlying Here we override `_from_module` to check the underlying
function instead. https://github.com/python/cpython/issues/107995 function instead. https://github.com/python/cpython/issues/107995