-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #1962: when adding directives, roles or nodes from an extensio…
…n, warn if such an element is already present (built-in or added by another extension).
- Loading branch information
1 parent
cb2f35e
commit cdf0f82
Showing
2 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cdf0f82
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@birkenfeld the change might cause test failure
https://travis-ci.org/sphinx-doc/sphinx/builds/71917962
cdf0f82
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw it, but I did not have time to finish the fix :) sorry for the confusion.
cdf0f82
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a
type
andsubtype
to thewarn()
calls so that these can be ignored usingsuppress_warnings
? I'm thinking something liketype='directive_overridden', subtype=name
. For example, Django is overridingversionchanged
andversionadded
so we could have:cdf0f82
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a PR based on my previous comment: #2455, although the current solution introduces a test failure.