This is a filter to remove in sphinx 3+ the error about config traits being duplicated. As we autogenerate configuration traits from, subclasses have lots of duplication and we want to silence them. Indeed we build on travis with warnings-as-error set to True, so those duplicate i
| 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 |