Remove unnecessary(?) method that's causing a deprecation warning #1475
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
add_content
method in thetrait_documenter
Sphinx extension is causing aDeprecationWarning
. It looks as though we don't need it, and this PR removes it.In manual testing with a range of Sphinx versions from 1.8.5 onwards, after removing this method, I was unable to observe either documentation build failures or visible problems with the built documentation.
I'd be slightly happier if I understood why this code was there in the first place, but I've failed to discover the reason. @itziakos is the original author of this code, and may have some ideas.
It's also worth noting that since #1469, an attempt to access the
__doc__
attribute on aCTrait
object will fail in the expected way, rather than potentially confusing Sphinx by returningNone
, so I can't think of any reason why we'd need this override with Traits master branch, even if we did need it with earlier versions of Traits.Fixes #1443.