Open
Description
The tests are failing if autodocsumm is getting build and tested within a Python 3.13 environment. The failure is looking always the same.
self = <autodocsumm.NoDataDataDocumenter object at 0x7f4bb1b73e70>, args = ()
kwargs = {}, content = 'both'
docstrings = ["str(object='') -> str\nstr(bytes_or_buffer[, encoding[, errors]]) -> str\n\nCreate a new string object from the give...ined)\nor repr(object).\nencoding defaults to 'utf-8'.\nerrors defaults to 'strict'.\nThe type of the None singleton."]
docstring = "str(object='') -> str\nstr(bytes_or_buffer[, encoding[, errors]]) -> str\n\nCreate a new string object from the given...fined)\nor repr(object).\nencoding defaults to 'utf-8'.\nerrors defaults to 'strict'.\nThe type of the None singleton."
calldocstring = 'The type of the None singleton.', doc = []
def get_doc(self, *args, **kwargs):
"""Reimplemented to include data from the call method"""
content = self.env.config.autodata_content
if content not in ('both', 'call') or not self.get_attr(
self.get_attr(self.object, '__call__', None), '__doc__'):
return super(CallableDataDocumenter, self).get_doc(
*args, **kwargs
)
# for classes, what the "docstring" is can be controlled via a
# config value; the default is both docstrings
docstrings = []
if content != 'call':
docstring = self.get_attr(self.object, '__doc__', None)
docstrings = [docstring + '\n'] if docstring else []
calldocstring = self.get_attr(
self.get_attr(self.object, '__call__', None), '__doc__')
if docstrings:
docstrings[0] += calldocstring
else:
docstrings.append(calldocstring + '\n')
doc = []
for docstring in docstrings:
if not isinstance(docstring, str):
docstring = force_decode(docstring, encoding)
> doc.append(prepare_docstring(docstring, ignore))
E NameError: name 'ignore' is not defined
autodocsumm/__init__.py:459: NameError
This is happen as the used variable ignore
is never getting something assigned to in this function within autodocsumm/init.py.
Simply removing the variable is making the tests running successfully again in Python 3.12 and 3.13.
Metadata
Metadata
Assignees
Labels
No labels