diff --git a/tg/utils.py b/tg/utils.py index e1f09df..4f8ec9a 100644 --- a/tg/utils.py +++ b/tg/utils.py @@ -158,7 +158,7 @@ def get_video_resolution(file_path: str) -> Tuple[int, int]: def get_waveform(file_path: str) -> str: - # mock for now + # stub for now waveform = (random.randint(0, 255) for _ in range(100)) packed = struct.pack("100B", *waveform) return base64.b64encode(packed).decode() @@ -236,7 +236,7 @@ class suspend: def __enter__(self) -> "suspend": for view in (self.view.chats, self.view.msgs, self.view.status): view._refresh = view.win.noutrefresh - self.view.resize_handler = self.view.resize_mock + self.view.resize_handler = self.view.resize_stub curses.echo() curses.nocbreak() self.view.stdscr.keypad(False) diff --git a/tg/views.py b/tg/views.py index 5a6fe31..ba77589 100644 --- a/tg/views.py +++ b/tg/views.py @@ -4,7 +4,6 @@ from datetime import datetime from typing import Any, Dict, List, Optional, Tuple, Union, cast from _curses import window # type: ignore - from tg import config from tg.colors import bold, cyan, get_color, magenta, reverse, white, yellow from tg.models import Model, UserModel @@ -59,7 +58,7 @@ class View: self.max_read = 2048 self.resize_handler = self.resize - def resize_mock(self) -> None: + def resize_stub(self) -> None: pass def resize(self) -> None: