summaryrefslogtreecommitdiff
path: root/poezio/tabs/basetabs.py
diff options
context:
space:
mode:
Diffstat (limited to 'poezio/tabs/basetabs.py')
-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