-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question regarding injecting DocStrings #589
Comments
Hey, that's a very good question! This deserves an entry in the docs 🙂 The The In the end, you can solve this by adding this line to your Python handler options, in mkdocs.yml: Footnotes
|
Okay, thank you for the detailed explanation. The last detail I dont understand: OrderedDict is imported explicitely. Why doesnt it work in that case? Because it´s placed in an exception block and therefore not a direct child of the AST root node? |
It does not work because it is imported from
Let me know if this is still unclear 🙂 |
One more question if you dont mind, in case you are familiar with the following plugin. 😄 |
If by "importing modules there" you mean If by "importing modules there" you mean using the |
Just trying to understand, from what scope can I insert DocStrings into my project?
This here works:
::: logging.LogRecord
or even:
::: mkdocs.something_from_mkdocs
but
::: ast.AST
(or anything else from ast module) gives "could not collect" error.
EDIT:
My guess would be: because MkDocStrings is using the AST for checking and ast.AST is imported via star operator?
( https://github.com/python/cpython/blob/main/Lib/ast.py#L29C15-L29C15 )
EDIT2:
... and
::: collections.OrderedDict
raises a different Exception,jinja2.exceptions.TemplateNotFound: alias.html
The text was updated successfully, but these errors were encountered: