summaryrefslogtreecommitdiff
path: root/poezio/keyboard.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/keyboard.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/keyboard.py')
-rwxr-xr-xpoezio/keyboard.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/poezio/keyboard.py b/poezio/keyboard.py
index 3d8e8d5c..23da2e37 100755
--- a/poezio/keyboard.py
+++ b/poezio/keyboard.py
@@ -26,7 +26,7 @@ log = logging.getLogger(__name__)
# shortcuts or inserting text in the current output. The callback
# is always reset to None afterwards (to resume the normal
# processing of keys)
-continuation_keys_callback = None # type: Optional[Callable]
+continuation_keys_callback: Optional[Callable] = None
def get_next_byte(s) -> Tuple[Optional[int], Optional[bytes]]:
@@ -46,7 +46,7 @@ def get_next_byte(s) -> Tuple[Optional[int], Optional[bytes]]:
def get_char_list(s) -> List[str]:
- ret_list = [] # type: List[str]
+ ret_list: List[str] = []
while True:
try:
key = s.get_wch()