__init__.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. """
  2. Styling for prompt_toolkit applications.
  3. """
  4. from __future__ import annotations
  5. from .base import (
  6. ANSI_COLOR_NAMES,
  7. DEFAULT_ATTRS,
  8. Attrs,
  9. BaseStyle,
  10. DummyStyle,
  11. DynamicStyle,
  12. )
  13. from .defaults import default_pygments_style, default_ui_style
  14. from .named_colors import NAMED_COLORS
  15. from .pygments import (
  16. pygments_token_to_classname,
  17. style_from_pygments_cls,
  18. style_from_pygments_dict,
  19. )
  20. from .style import Priority, Style, merge_styles, parse_color
  21. from .style_transformation import (
  22. AdjustBrightnessStyleTransformation,
  23. ConditionalStyleTransformation,
  24. DummyStyleTransformation,
  25. DynamicStyleTransformation,
  26. ReverseStyleTransformation,
  27. SetDefaultColorStyleTransformation,
  28. StyleTransformation,
  29. SwapLightAndDarkStyleTransformation,
  30. merge_style_transformations,
  31. )
  32. __all__ = [
  33. # Base.
  34. "Attrs",
  35. "DEFAULT_ATTRS",
  36. "ANSI_COLOR_NAMES",
  37. "BaseStyle",
  38. "DummyStyle",
  39. "DynamicStyle",
  40. # Defaults.
  41. "default_ui_style",
  42. "default_pygments_style",
  43. # Style.
  44. "Style",
  45. "Priority",
  46. "merge_styles",
  47. "parse_color",
  48. # Style transformation.
  49. "StyleTransformation",
  50. "SwapLightAndDarkStyleTransformation",
  51. "ReverseStyleTransformation",
  52. "SetDefaultColorStyleTransformation",
  53. "AdjustBrightnessStyleTransformation",
  54. "DummyStyleTransformation",
  55. "ConditionalStyleTransformation",
  56. "DynamicStyleTransformation",
  57. "merge_style_transformations",
  58. # Pygments.
  59. "style_from_pygments_cls",
  60. "style_from_pygments_dict",
  61. "pygments_token_to_classname",
  62. # Named colors.
  63. "NAMED_COLORS",
  64. ]