summaryrefslogtreecommitdiff
path: root/poezio/tabs
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2019-10-27 14:48:27 +0100
committermathieui <mathieui@mathieui.net>2019-10-27 14:48:27 +0100
commit80a7babc0c6e850f2de7572ebc94729ee24fcde3 (patch)
tree1afe1047c73308da28ff7e1e790ddf51257a5a23 /poezio/tabs
parent2f4651d036658d3ecdff65581c0c7278eca4d5af (diff)
downloadpoezio-80a7babc0c6e850f2de7572ebc94729ee24fcde3.tar.gz
poezio-80a7babc0c6e850f2de7572ebc94729ee24fcde3.tar.bz2
poezio-80a7babc0c6e850f2de7572ebc94729ee24fcde3.tar.xz
poezio-80a7babc0c6e850f2de7572ebc94729ee24fcde3.zip
Type curses windows
Diffstat (limited to 'poezio/tabs')
-rw-r--r--poezio/tabs/basetabs.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py
index 0cae3c6a..2efc77a0 100644
--- a/poezio/tabs/basetabs.py
+++ b/poezio/tabs/basetabs.py
@@ -21,7 +21,15 @@ import time
from math import ceil, log10
from datetime import datetime
from xml.etree import cElementTree as ET
-from typing import Any, Callable, Dict, List, Optional, Union
+from typing import (
+ Any,
+ Callable,
+ Dict,
+ List,
+ Optional,
+ Union,
+ TYPE_CHECKING,
+)
from poezio import mam, poopt, timed_events, xhtml, windows
from poezio.core.structs import Command, Completion, Status
@@ -35,6 +43,9 @@ from poezio.windows.funcs import truncate_nick
from slixmpp import JID, InvalidJID, Message
+if TYPE_CHECKING:
+ from _curses import _CursesWindow
+
log = logging.getLogger(__name__)
# getters for tab colors (lambdas, so that they are dynamic)
@@ -176,7 +187,7 @@ class Tab:
self._state = 'normal'
@staticmethod
- def resize(scr):
+ def resize(scr: '_CursesWindow'):
Tab.height, Tab.width = scr.getmaxyx()
windows.base_wins.TAB_WIN = scr