Closed Skrattoune closed 1 month ago
Hello, thanks for the report.
Working in Django, I have to use python-legacy
Why? Because it has better support for Django? Could you explain what you would expect from mkdocstrings in terms of Django support? I'd like to better support it in the new handler, with an extension, like we do for Pydantic.
ERROR - mkdocstrings: display() got an unexpected keyword argument 'link'
Can you run MkDocs in verbose mode and paste the logs? mkdocs build -v
What version of dependencies do you have? pip freeze | grep docs
Working in Django, I have to use python-legacy
Why? Because it has better support for Django?
Hi, it is just stated in the documentation that the new handler does not currently support Django ...
so I didn't even try with the new python handler
Update: when I try exactly the same with the new python handler ... verbose mode shows me that I go through all files ... but no reference to code shows on the generated pages
What version of dependencies do you have?
dependancies:
Could you explain what you would expect from mkdocstrings in terms of Django support? I'd like to better support it in the new handler, with an extension, like we do for Pydantic.
That would be great indeed.
I'm really not sure why nothing is showing-up when I run mkdocstrings on my python projects from the mkdocs.yml
file from before.
I guess that solving this first could be a first step.
How can I support?
I see, thanks for your answer.
Indeed the new handler won't pick up description from model fields for example, so rendered docs will look empty. Support for Django is planned in the new handler too, I'll try to get to it soon :slightly_smiling_face: Support will be brought as an extension to Griffe, and this extension will be available to sponsors only.
Other than that, PRs to pytkdocs (used by the legacy handler) are welcome if you'd like to try and fix this issue :slightly_smiling_face: I'll move it to the pytkdocs repo.
By the way, I'm not sure to understand the actual issue yet.
There's no display
function in pytkdocs or mkdocstrings-python-legacy. Does this function come from your own code?
Closing for lack of update, let me know if you're still experiencing the issue and I'll reopen.
Is your feature request related to a problem? Please describe. My prod is currently in Django 3.2, but I have some unused modules already containing code that will be ready for future versions.
When mkdocstrings is discovering the submodules of my apps, it blocks because there is an
unexpected keyword argument
:ERROR - mkdocstrings: display() got an unexpected keyword argument 'link'
Describe the solution you'd like I haven't been able to find on the web or in official documentation any means to prevent the autodiscovery of specific functions to prevent this type of error / blockage
Similarly, even when implementing a decorator that prevent the execution of wrapped functions, the error also happened
Similarly, even when implementing a decorator that prevent the execution of wrapped functions, the error also happened
I therefore guess a deeper kowledge of mkdocsstrins is needed to put in place a dedicated decorator to bypass autodiscovery of specific functions
or to put in place other effective alternative to to bypass autodiscovery of specific functions
In any case, it would be great to embed into the official pluggin documentation.
Thanks in advance, Skratt
Additional context Working in Django, I have to use
python-legacy
, and I here is mymkdocs.yml
file: