You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Don't show the implicit self parameter in the function signature #7
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 explicit self parameter. The built in python help() 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 show self" would be even better.
Describe alternatives you've considered
An alternative is to not have a config option and just never show it.
You're probably right, we're documenting APIs and users never have to pass self so I guess it'd be reasonable to always hide it.
Then cls should be hidden as well right?
Activity
bear24rw commentedon Mar 3, 2022
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.
pawamoy commentedon Mar 3, 2022
You're probably right, we're documenting APIs and users never have to pass
selfso I guess it'd be reasonable to always hide it.Then
clsshould be hidden as well right?bear24rw commentedon Mar 4, 2022
I believe so!
refactor: Always hide `self` and `cls` parameters
pawamoy commentedon Mar 5, 2022
Done in version 0.6.6
refactor: Always hide `self` and `cls` parameters