mirror of
https://github.com/paul-nameless/tg
synced 2024-11-22 03:43:19 +00:00
Rename mock->stub
This commit is contained in:
parent
859de4a6d3
commit
be1ae815d2
2 changed files with 3 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue