Remove old stubs
This commit is contained in:
parent
d6ff3cc3a8
commit
57cfd41613
5 changed files with 0 additions and 63 deletions
1
.flake8
1
.flake8
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in a new issue