diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-08-18 08:04:41 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-08-18 08:04:41 +0100 |
commit | 73749091aec9b2e7780a4f913268bcfc73e86e1e (patch) | |
tree | a11f1b6a5b5aee20425f012b9f927a17fc5e5e9f | |
parent | 2abbf8274ca3e8473ea2ef729459fc6549edf474 (diff) | |
download | poezio-73749091aec9b2e7780a4f913268bcfc73e86e1e.tar.gz poezio-73749091aec9b2e7780a4f913268bcfc73e86e1e.tar.bz2 poezio-73749091aec9b2e7780a4f913268bcfc73e86e1e.tar.xz poezio-73749091aec9b2e7780a4f913268bcfc73e86e1e.zip |
Remove some circular type imports.
-rw-r--r-- | poezio/text_buffer.py | 7 | ||||
-rw-r--r-- | poezio/windows/info_bar.py | 9 |
2 files changed, 7 insertions, 9 deletions
diff --git a/poezio/text_buffer.py b/poezio/text_buffer.py index 1a2c073b..448adff3 100644 --- a/poezio/text_buffer.py +++ b/poezio/text_buffer.py @@ -15,7 +15,6 @@ from typing import Union, Optional, List, Tuple from datetime import datetime from poezio.config import config from poezio.theming import get_theme, dump_tuple -from poezio.windows import BaseTextWin class Message: @@ -127,9 +126,9 @@ class TextBuffer: # we keep track of one or more windows # so we can pass the new messages to them, as they are added, so # they (the windows) can build the lines from the new message - self._windows = [] # type: List[BaseTextWin] + self._windows = [] - def add_window(self, win: BaseTextWin) -> None: + def add_window(self, win) -> None: self._windows.append(win) @property @@ -278,7 +277,7 @@ class TextBuffer: log.debug('Replacing message %s with %s.', old_id, new_id) return message - def del_window(self, win: BaseTextWin) -> None: + def del_window(self, win) -> None: self._windows.remove(win) def __del__(self): diff --git a/poezio/windows/info_bar.py b/poezio/windows/info_bar.py index 033f78aa..96382d0f 100644 --- a/poezio/windows/info_bar.py +++ b/poezio/windows/info_bar.py @@ -11,15 +11,14 @@ log = logging.getLogger(__name__) import curses from poezio.config import config -from poezio.core import Core from poezio.windows.base_wins import Win from poezio.theming import get_theme, to_curses_attr class GlobalInfoBar(Win): - def __init__(self, core: Core) -> None: + def __init__(self, core) -> None: Win.__init__(self) - self.core = core # type: Core + self.core = core def refresh(self) -> None: log.debug('Refresh: %s', self.__class__.__name__) @@ -64,9 +63,9 @@ class GlobalInfoBar(Win): class VerticalGlobalInfoBar(Win): - def __init__(self, core: Core, scr) -> None: + def __init__(self, core, scr) -> None: Win.__init__(self) - self.core = core # type: Core + self.core = core self._win = scr def refresh(self) -> None: |