-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Don't show the implicit self
parameter in the function signature
#7
Comments
I think what I am after can be achieved with this patch. I'd argue that this is the correct thing to do by default for class methods. diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/class.html b/src/mkdocstrings_handlers/python/templates/material/_base/class.html
index 8f47fb8..6a27c08 100644
--- a/src/mkdocstrings_handlers/python/templates/material/_base/class.html
+++ b/src/mkdocstrings_handlers/python/templates/material/_base/class.html
@@ -105,10 +105,12 @@
{% endif %}
{% endif %}
- {% with obj = class %}
- {% set root = False %}
- {% set heading_level = heading_level + 1 %}
- {% include "children.html" with context %}
+ {% with no_self = True %}
+ {% with obj = class %}
+ {% set root = False %}
+ {% set heading_level = heading_level + 1 %}
+ {% include "children.html" with context %}
+ {% endwith %}
{% endwith %}
</div> |
You're probably right, we're documenting APIs and users never have to pass |
I believe so! |
pawamoy
added a commit
that referenced
this issue
Mar 5, 2022
Done in version 0.6.6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I would like to not show the implicit
self
parameter in the function signatures. Since the documentation is most often read by a user of the object there is no need to show them to the explicitself
parameter. The built in pythonhelp()
docstring renderer does not show it.Describe the solution you'd like
A config option to disable show
self
would be ideal. Defaulting to "dont showself
" would be even better.Describe alternatives you've considered
An alternative is to not have a config option and just never show it.
The text was updated successfully, but these errors were encountered: