Cleanup formatting

This commit is contained in:
Ivan Habunek 2023-11-04 07:26:45 +01:00
parent 06167a5bc9
commit a9ef96c31b
No known key found for this signature in database
GPG Key ID: F5F0623FF5EBCB3D
3 changed files with 8 additions and 23 deletions

View File

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

View File

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

View File

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