summaryrefslogtreecommitdiff
path: root/poezio/theming.py
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2020-12-12 18:44:37 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2020-12-12 19:36:18 +0100
commit65b8046fe08a19df937068e5fe5ad15f9b0a785a (patch)
tree827e17a99d39c5db453d0fc0e9b46249292aa4e3 /poezio/theming.py
parent34ec9e3ee1384506b2e803bdfe94201a7b7ff4c3 (diff)
downloadpoezio-65b8046fe08a19df937068e5fe5ad15f9b0a785a.tar.gz
poezio-65b8046fe08a19df937068e5fe5ad15f9b0a785a.tar.bz2
poezio-65b8046fe08a19df937068e5fe5ad15f9b0a785a.tar.xz
poezio-65b8046fe08a19df937068e5fe5ad15f9b0a785a.zip
from __future__ import annotations
Now that our baseline is Python 3.7, we can rely on type annotations to be lazily evaluated.
Diffstat (limited to 'poezio/theming.py')
-rwxr-xr-xpoezio/theming.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/poezio/theming.py b/poezio/theming.py
index 7752fe15..6245a48d 100755
--- a/poezio/theming.py
+++ b/poezio/theming.py
@@ -291,7 +291,7 @@ class Theme:
(224, -1), (225, -1), (226, -1), (227, -1)]
# XEP-0392 consistent color generation palette placeholder
# it’s generated on first use when accessing the ccg_palette property
- CCG_PALETTE = None # type: Optional[Dict[float, int]]
+ CCG_PALETTE: Optional[Dict[float, int]] = None
CCG_Y = 0.5**0.45
# yapf: enable
@@ -393,8 +393,7 @@ theme = Theme()
# Each time we use a color tuple, we check if it has already been used.
# If not we create a new color_pair and keep it in that dict, to use it
# the next time.
-curses_colors_dict = {
-} # type: Dict[Union[Tuple[int, int], Tuple[int, int, str]], int]
+curses_colors_dict: Dict[Union[Tuple[int, int], Tuple[int, int, str]], int] = {}
# yapf: disable
@@ -418,7 +417,7 @@ table_256_to_16 = [
]
# yapf: enable
-load_path = [] # type: List[str]
+load_path: List[str] = []
def color_256_to_16(color):