Closed
Description
Describe the bug
I attempted to use the new docstring handler for Python. The first time I tried to generate the documentation I encountered an unhanded exception.
The end of the stack trace:
...
File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/mkdocstrings_handlers/python/templates/material/_base/docstring.html", line 21, in top-level template code
{% include "docstring/returns.html" with context %}
File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/mkdocstrings_handlers/python/templates/material/docstring/returns.html", line 1, in top-level template code
{% extends "_base/docstring/returns.html" %}
File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html", line 3, in top-level template code
{% set name_column = section.value|selectattr("name")|any %}
File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/mkdocstrings/handlers/base.py", line 57, in do_any
return any(seq)
File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/jinja2/filters.py", line 1749, in select_or_reject
for item in value:
TypeError: 'DocstringReturn' object is not iterable
To Reproduce
This failed CI step demonstrate the failure.
Expected behavior
The API documentation is generated as it did with the previous handler.
System (please complete the following information):
mkdocstrings-python
version: 0.6.2- Python version: 3.10.2
- OS: Ubuntu 20.04.3