-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
feat (python handler): Root children full path #136
Conversation
Implements the Python handler option show_root_members_full_path: Shows the full Python path of the direct children of the object at the root of the documentation tree. Defaults to false. References mkdocstrings#134
Alright, that's what I was expecting 🙂 |
{% if not root or config.show_root_heading %} | ||
{% if not root or config.show_root_heading%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: please re-add the space to reduce diff and stay consistent 😛
Same remark in every other file!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, good catch! I'll fix this.
Actually this would be a "breaking" change for users using |
src/mkdocstrings/handlers/python.py
Outdated
@@ -55,6 +56,7 @@ class PythonRenderer(BaseRenderer): | |||
**`show_root_toc_entry`** | `bool` | If the root heading is not shown, at least add a ToC entry for it. | `True` | |||
**`show_root_full_path`** | `bool` | Show the full Python path for the root object heading. | `True` | |||
**`show_object_full_path`** | `bool` | Show the full Python path of every object. | `False` | |||
**`show_root_members_full_path`** | `bool` | Show the full Python path of objects that are children of the root object (for example, classes in a module). | `False` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer False
by default.
Hmm, something weird I've noticed - now
Is this desirable? Another approach would be for {% elif root_members %}
{% set show_full_path = config.show_root_members_full_path or config.show_object_full_path %}
{% set root_members = False %}
|
Yes, it sounds good. You convinced me 🙂 You can commit and push the snippet you mentioned. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @adunmore!
Not sure what happened in CI for Windows. Let's ignore it for now. |
Implements the Python handler option
show_root_members_full_path
:Shows the full Python path of the direct children of the object at the
root of the documentation tree. Defaults to false.
References #134