##// END OF EJS Templates
Try to add a filter in Sphinx to get rid of warnings....
Matthias Bussonnier -
Show More
@@ -121,6 +121,29 b' numpydoc_show_class_members = False # Otherwise Sphinx emits thousands of warnin'
121 numpydoc_class_members_toctree = False
121 numpydoc_class_members_toctree = False
122 warning_is_error = True
122 warning_is_error = True
123
123
124 import logging
125
126 class ConfigtraitFilter(logging.Filter):
127 """
128 This is a filter to remove in sphinx 3+ the error about config traits being duplicated.
129
130 As we autogenerate configuration traits from, subclasses have lots of
131 duplication and we want to silence them. Indeed we build on travis with
132 warnings-as-error set to True, so those duplicate items make the build fail.
133 """
134
135 def filter(self, record):
136 if record.args and record.args[0] == 'configtrait' and 'duplicate' in record.msg:
137 return False
138 return True
139
140 ct_filter = ConfigtraitFilter()
141
142 import sphinx.util
143 logger = sphinx.util.logging.getLogger('sphinx.domains.std').logger
144
145 logger.addFilter(ct_filter)
146
124 # The default replacements for |version| and |release|, also used in various
147 # The default replacements for |version| and |release|, also used in various
125 # other places throughout the built documents.
148 # other places throughout the built documents.
126 #
149 #
General Comments 0
You need to be logged in to leave comments. Login now