Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 52
Open
Labels
configRelated to configuration optionsRelated to configuration optionsrefactorChange suggestion, not a bug nor a feature.Change suggestion, not a bug nor a feature.templatesJinja templatesJinja templates
Description
Description of the bug
When calling a method on an input argument to a class __init__ while having separate_signature: true, the parameter name disappears from the rendered instance attribute docstring, leaving only the attribute name and the method called on the input argument.
To Reproduce
Details
python -m venv .venv. .venv/bin/activatepip install mkdocstrings-pythonpython# mkdocs.ymlsite_name: test-siteplugins: - mkdocstrings: default_handler: pythonhandlers: python: options: separate_signature: true<!-- test.md --> ::: test# test.pyclassSomeClass: """This is a class that does something."""def__init__(self, some_float: float) ->None: self.as_hex=some_float.hex() """The hex value of the input float."""Expected behavior
I expect the rendered docstring for the as_hex instance attribute to say as_hex = some_float.hex().
Actual behavior
With separate_signature: true, the some_float part disappears, and what is rendered is only as_hex = hex().
Environment information
python -m mkdocstrings_handlers.python.debug # | xclip -selection clipboard- System: Linux-6.8.0-49-generic-x86_64-with-glibc2.39
- Python: cpython 3.13.1 (/home/stefan/test-mkdocstrings/.venv/bin/python)
- Environment variables:
- Installed packages:
mkdocsv1.6.1mkdocstringsv0.27.0mkdocstrings-pythonv1.12.2griffev1.5.1
Metadata
Metadata
Assignees
Labels
configRelated to configuration optionsRelated to configuration optionsrefactorChange suggestion, not a bug nor a feature.Change suggestion, not a bug nor a feature.templatesJinja templatesJinja templates

