Closed hille721 closed 1 year ago
This is because the the documented args foo
and bar
don't appear in the signature. It would be fine if the signature was written like so:
a_function_with_kwargs(
a: str,
foo: str = "",
bar: str = "",
**kwargs
) -> str
This warning is specific to sphinx-immaterial because this theme tries to cross-link parameter desciptions in the docstring with parameter declarations in the signature.
To disable the theme's behavior about cross-linking parameters, I think you have to disable the include_in_toc
setting for python parameters:
object_description_options = [
("py:param", dict(include_in_toc=False)),
]
Although, this suggestion might be inaccurate.
This problem is related to the proposed solution in #112 which was never implemented/resolved.
I don't think include_in_toc
will avoid this warning. However, you could just add a rule to sphinx to ignore this warning.
I don't think include_in_toc will avoid this warning. However, you could just add a rule to sphinx to ignore this warning.
Make sense. Also don't see any side effect. Thanks.
Btw, already went live with the new theme today. Thanks for this amazing project!
For other passersby, given the suppress_warnings
config's doc, which warning type would this fall under?
I'm actually not sure what warning type it would be. It would be better if you could just specify a regular expression...
Given the debug output in OP, I would think the warning type would be app
(or app.event-emitted
), but that would be too generic.
It would be nice to use regex... The zephyr project uses a in-house extension to filter out warnings that can't be avoided from doxygen+breathe.
I'm closing this as a better comprehensive solution is being tracked in #112
Not sure if this is a sphinx-immaterial issue, but at least this warning just appears when using this theme. I'm using Google Docstring Format and so the Sphinx napoleon extension.
conf.py:
foo.py
Detailed logs: