mirror of
https://github.com/ihabunek/toot.git
synced 2024-09-29 04:35:54 -04:00
Cleanup formatting
This commit is contained in:
parent
06167a5bc9
commit
a9ef96c31b
@ -1,16 +1,14 @@
|
||||
"""
|
||||
richtext
|
||||
"""
|
||||
from typing import List, Tuple
|
||||
import re
|
||||
import urwid
|
||||
import unicodedata
|
||||
from .constants import PALETTE
|
||||
|
||||
from bs4 import BeautifulSoup
|
||||
from bs4.element import NavigableString, Tag
|
||||
from .stubs.urwidgets import TextEmbed, Hyperlink, parse_text, has_urwidgets
|
||||
from urwid.util import decompose_tagmarkup
|
||||
from toot.tui.constants import PALETTE
|
||||
from toot.tui.stubs.urwidgets import TextEmbed, Hyperlink, parse_text, has_urwidgets
|
||||
from toot.utils import urlencode_url
|
||||
from typing import List, Tuple
|
||||
from urwid.util import decompose_tagmarkup
|
||||
|
||||
|
||||
class ContentParser:
|
||||
|
@ -4,12 +4,7 @@ import urwid
|
||||
|
||||
|
||||
class Hyperlink(urwid.WidgetWrap):
|
||||
def __init__(
|
||||
self,
|
||||
uri,
|
||||
attr,
|
||||
text,
|
||||
):
|
||||
def __init__(self, uri, attr, text):
|
||||
pass
|
||||
|
||||
def render(self, size, focus):
|
||||
|
@ -4,9 +4,7 @@ import urwid
|
||||
|
||||
|
||||
class TextEmbed(urwid.Text):
|
||||
def get_text(
|
||||
self,
|
||||
):
|
||||
def get_text(self):
|
||||
return None
|
||||
|
||||
def render(self, size, focus):
|
||||
@ -19,11 +17,5 @@ class TextEmbed(urwid.Text):
|
||||
pass
|
||||
|
||||
|
||||
def parse_text(
|
||||
text,
|
||||
patterns,
|
||||
repl,
|
||||
*repl_args,
|
||||
**repl_kwargs,
|
||||
):
|
||||
def parse_text(text, patterns, repl, *repl_args, **repl_kwargs):
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user