1
0
mirror of https://github.com/ihabunek/toot.git synced 2024-11-03 04:17:21 -05:00

Remove old stubs

This commit is contained in:
Ivan Habunek 2023-11-16 11:49:48 +01:00
parent d6ff3cc3a8
commit 57cfd41613
No known key found for this signature in database
GPG Key ID: F5F0623FF5EBCB3D
5 changed files with 0 additions and 63 deletions

View File

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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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