base.py 1.0 KB

1234567891011121314151617181920212223242526272829
  1. """Global configuration class."""
  2. # Copyright (c) Jupyter Development Team.
  3. # Distributed under the terms of the Modified BSD License.
  4. from traitlets import List
  5. from traitlets.config.configurable import LoggingConfigurable
  6. from traitlets import Unicode
  7. class NbConvertBase(LoggingConfigurable):
  8. """Global configurable class for shared config
  9. Useful for display data priority that might be used by many transformers
  10. """
  11. display_data_priority = List(['text/html', 'application/pdf', 'text/latex', 'image/svg+xml', 'image/png', 'image/jpeg', 'text/markdown', 'text/plain'],
  12. help= """
  13. An ordered list of preferred output type, the first
  14. encountered will usually be used when converting discarding
  15. the others.
  16. """
  17. ).tag(config=True)
  18. default_language = Unicode('ipython',
  19. help='Deprecated default highlight language as of 5.0, please use language_info metadata instead'
  20. ).tag(config=True)
  21. def __init__(self, **kw):
  22. super(NbConvertBase, self).__init__(**kw)