-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Merging of model field docstrings isn't rendering 2nd order directives #32
Comments
Hey, very nice, thanks! that absolutely works great for 'regular' directives like There is still an issue with my particular use case, which is related to how some of the directives in sphinx-needs work. Somehow I think the docstring is getting processed twice, which is causing an error in sphinx-needs related to seeing the same directive with the same ID twice.
Maybe the merged docstring that you make is getting left in two places somehow? Anyway I wouldn't blame you for closing this issue since you did make a good improvement. If there's anything you see that might render the directive in the docstring twice that'd be great to remove. My input is
|
Ah, interesting, I wasn't aware of such limitations. and once as individual field: I'm not sure if there is something I can do on my side, maybe an option to disable the inclusion of docstrings in the parameter documentation of models? In your case, I think it would be the easiest to make use of the autodoc-skip-member signal by putting this into your
Interestingly, I just found a small bug in this extension which does prevent this code to work (#35), but I will fix this asap. |
I've released version 2.2 now, could you test whether the snippet I provided does the job? |
Hi, I'm trying to use this package in concert with another one that defines other directives (sphinx-needs).
I have a model field that has help text and its own docstring. This packages merges them as expected, but does not allow the directive in the previously-existing docstring to get rendered as a directive.
input:
Current result:
Desired result:
Something more like:
The text was updated successfully, but these errors were encountered: