%config can't configure PlainTextFormatter
- Ngôn ngữ chính
- Python
- Star
- 16.8k
- Fork
- 4.5k
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 6
Mô tả
I'm trying to (re-)configure PlainTextFormatter using %config, but it doesn't take.
Looking through the code, `%config` creates a new config object and updates each object in `get_ipython().configurables`. This does not include PlainTextFormatter. DisplayFormatter, which owns PlainTextFormatter, does exist and will be reconfigured, however it does nothing to propagate the changes to PlainTextFormatter or any of the other formatters.
During initialization this is not a problem because any of the formatters will take DisplayFormatter as parent Configurable and copy the reference to the config object.
It would be nice to be able to configure PlainTextFormatter from `%config`. Either simply including PlainTextFormatter in `.configurables` or by making DisplayFormatter directly reconfigure it when it itself is reconfigured, or possibly by making PlainTextFormatter observe the config trait on its parent, however that would seem to be something that belongs in the traitlets library.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.