Closed kdeldycke closed 6 months ago
This should be reported to autodoc maintainers, there's no bug here. I guess we can add an exception for __annotations__
in Cloup to solve this quickly. We could also change Color to be extends both str
and Enum
(but I guess that would be formally a breaking change).
Thanks @janluke for the quick reply. You're right, so I opened an issue upstream in Sphinx at: https://github.com/sphinx-doc/sphinx/issues/11986 . We'll see if it get some attention.
I can confirm the issue is fixed by the new 3.0.5 release. Thanks @janluke ! 😎
Bug description
When trying to generate documentation with Sphinx, its
autodoc
plugin trips oncloup.Color
. The latter cannot be rendered in Sphinx becausecloup/_util.py::FrozenSpaceMeta.__setattr__()
is always raising an exception.To Reproduce
This happened in my Click Extra project, in which I re-expose
cloup.Color
in myclick_extra
module via__all__
.Here is the full traceback of Sphinx trying to generate the documentation of Click Extra: