Remove old stubs

pull/412/head
Ivan Habunek 2023-11-16 11:49:48 +01:00
rodzic d6ff3cc3a8
commit 57cfd41613
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: F5F0623FF5EBCB3D
5 zmienionych plików z 0 dodań i 63 usunięć

Wyświetl plik

@ -1,5 +1,4 @@
[flake8]
exclude=build,tests,tmp,venv,toot/tui/scroll.py
ignore=E128,W503
per-file-ignores=toot/tui/stubs/urwidgets.py:F401
max-line-length=120

Wyświetl plik

@ -1,25 +0,0 @@
__all__ = ("Hyperlink",)
import urwid
class Hyperlink(urwid.WidgetWrap):
def __init__(self, uri, attr, text):
pass
def render(self, size, focus):
return None
class HyperlinkCanvas(urwid.Canvas):
def __init__(self, uri: str, text_canv: urwid.TextCanvas):
pass
def cols(self):
return 0
def content(self, *args, **kwargs):
yield [None]
def rows(self):
return 0

Wyświetl plik

@ -1,21 +0,0 @@
__all__ = ("parse_text", "TextEmbed")
import urwid
class TextEmbed(urwid.Text):
def get_text(self):
return None
def render(self, size, focus):
return None
def set_text(self, markup):
pass
def set_wrap_mode(self, mode):
pass
def parse_text(text, patterns, repl, *repl_args, **repl_kwargs):
return None

Wyświetl plik

@ -1,8 +0,0 @@
# If urwidgets is loaded use it; otherwise use our stubs
try:
from urwidgets import Hyperlink, TextEmbed, parse_text
has_urwidgets = True
except ImportError:
from .stub_hyperlink import Hyperlink
from .stub_text_embed import TextEmbed, parse_text
has_urwidgets = False

Wyświetl plik

@ -1,8 +0,0 @@
# If urwidgets is loaded use it; otherwise use our stubs
try:
from urwidgets import Hyperlink, TextEmbed, parse_text # noqa: F401
has_urwidgets = True
except ImportError:
from .stub_hyperlink import Hyperlink # noqa: F401
from .stub_text_embed import TextEmbed, parse_text # noqa: F401
has_urwidgets = False