diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-05 04:45:15 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-05 04:45:15 +0000 |
commit | 6dc655898df34ad424dfc467a8b276fdf31bd791 (patch) | |
tree | 0a3f3addbfc0b81e3850a628afe62ce830a8b0f3 /src/prompt_toolkit/styles | |
parent | Releasing progress-linux version 3.0.43-2~progress7.99u1. (diff) | |
download | prompt-toolkit-6dc655898df34ad424dfc467a8b276fdf31bd791.tar.xz prompt-toolkit-6dc655898df34ad424dfc467a8b276fdf31bd791.zip |
Merging upstream version 3.0.46.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/prompt_toolkit/styles/__init__.py | 1 | ||||
-rw-r--r-- | src/prompt_toolkit/styles/base.py | 1 | ||||
-rw-r--r-- | src/prompt_toolkit/styles/defaults.py | 1 | ||||
-rw-r--r-- | src/prompt_toolkit/styles/named_colors.py | 1 | ||||
-rw-r--r-- | src/prompt_toolkit/styles/pygments.py | 1 | ||||
-rw-r--r-- | src/prompt_toolkit/styles/style.py | 3 | ||||
-rw-r--r-- | src/prompt_toolkit/styles/style_transformation.py | 1 |
7 files changed, 8 insertions, 1 deletions
diff --git a/src/prompt_toolkit/styles/__init__.py b/src/prompt_toolkit/styles/__init__.py index 23f61bb..39e97ca 100644 --- a/src/prompt_toolkit/styles/__init__.py +++ b/src/prompt_toolkit/styles/__init__.py @@ -1,6 +1,7 @@ """ Styling for prompt_toolkit applications. """ + from __future__ import annotations from .base import ( diff --git a/src/prompt_toolkit/styles/base.py b/src/prompt_toolkit/styles/base.py index b50f3b0..0657221 100644 --- a/src/prompt_toolkit/styles/base.py +++ b/src/prompt_toolkit/styles/base.py @@ -1,6 +1,7 @@ """ The base classes for the styling. """ + from __future__ import annotations from abc import ABCMeta, abstractmethod, abstractproperty diff --git a/src/prompt_toolkit/styles/defaults.py b/src/prompt_toolkit/styles/defaults.py index 75b8dd2..2faba94 100644 --- a/src/prompt_toolkit/styles/defaults.py +++ b/src/prompt_toolkit/styles/defaults.py @@ -1,6 +1,7 @@ """ The default styling. """ + from __future__ import annotations from prompt_toolkit.cache import memoized diff --git a/src/prompt_toolkit/styles/named_colors.py b/src/prompt_toolkit/styles/named_colors.py index 0395c8b..b6290a4 100644 --- a/src/prompt_toolkit/styles/named_colors.py +++ b/src/prompt_toolkit/styles/named_colors.py @@ -2,6 +2,7 @@ All modern web browsers support these 140 color names. Taken from: https://www.w3schools.com/colors/colors_names.asp """ + from __future__ import annotations __all__ = [ diff --git a/src/prompt_toolkit/styles/pygments.py b/src/prompt_toolkit/styles/pygments.py index 3e101f1..c0f6031 100644 --- a/src/prompt_toolkit/styles/pygments.py +++ b/src/prompt_toolkit/styles/pygments.py @@ -6,6 +6,7 @@ Usage:: from pygments.styles.tango import TangoStyle style = style_from_pygments_cls(pygments_style_cls=TangoStyle) """ + from __future__ import annotations from typing import TYPE_CHECKING diff --git a/src/prompt_toolkit/styles/style.py b/src/prompt_toolkit/styles/style.py index 1abee0f..fc8b31b 100644 --- a/src/prompt_toolkit/styles/style.py +++ b/src/prompt_toolkit/styles/style.py @@ -1,6 +1,7 @@ """ Tool for creating styles from a dictionary. """ + from __future__ import annotations import itertools @@ -72,7 +73,7 @@ def parse_color(text: str) -> str: elif text in ("", "default"): return text - raise ValueError("Wrong color format %r" % text) + raise ValueError(f"Wrong color format {text!r}") # Attributes, when they are not filled in by a style. None means that we take diff --git a/src/prompt_toolkit/styles/style_transformation.py b/src/prompt_toolkit/styles/style_transformation.py index fbb5a63..e8d5b0a 100644 --- a/src/prompt_toolkit/styles/style_transformation.py +++ b/src/prompt_toolkit/styles/style_transformation.py @@ -9,6 +9,7 @@ When the UI is rendered, these transformations can be applied right after the style strings are turned into `Attrs` objects that represent the actual formatting. """ + from __future__ import annotations from abc import ABCMeta, abstractmethod |