Make flake8 happy

This commit is contained in:
Ivan Habunek 2023-01-01 11:13:21 +01:00
parent 64dd1094a9
commit 1e18f1f6d9
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95
2 changed files with 21 additions and 21 deletions

View File

@ -348,8 +348,8 @@ class TUI(urwid.Frame):
title="Status source",
)
def _clear_screen(self, widget):
self.loop.screen.clear()
def _clear_screen(self, widget):
self.loop.screen.clear()
def show_links(self, status):
links = parse_content_links(status.data["content"]) if status else []
@ -359,7 +359,7 @@ class TUI(urwid.Frame):
url = a["remote_url"] or a["url"]
links.append((url, a["description"] if a["description"] else url))
if links:
sl_widget=StatusLinks(links)
sl_widget = StatusLinks(links)
urwid.connect_signal(sl_widget, "clear-screen", self._clear_screen)
self.open_overlay(
widget=sl_widget,

View File

@ -16,24 +16,24 @@ class Timeline(urwid.Columns):
Displays a list of statuses to the left, and status details on the right.
"""
signals = [
"close", # Close thread
"compose", # Compose a new toot
"delete", # Delete own status
"favourite", # Favourite status
"focus", # Focus changed
"bookmark", # Bookmark status
"media", # Display media attachments
"menu", # Show a context menu
"next", # Fetch more statuses
"reblog", # Reblog status
"reply", # Compose a reply to a status
"source", # Show status source
"links", # Show status links
"thread", # Show thread for status
"translate", # Translate status
"save", # Save current timeline
"zoom", # Open status in scrollable popup window
"clear-screen", # clear the screen (used internally)
"close", # Close thread
"compose", # Compose a new toot
"delete", # Delete own status
"favourite", # Favourite status
"focus", # Focus changed
"bookmark", # Bookmark status
"media", # Display media attachments
"menu", # Show a context menu
"next", # Fetch more statuses
"reblog", # Reblog status
"reply", # Compose a reply to a status
"source", # Show status source
"links", # Show status links
"thread", # Show thread for status
"translate", # Translate status
"save", # Save current timeline
"zoom", # Open status in scrollable popup window
"clear-screen", # Clear the screen (used internally)
]
def __init__(self, name, statuses, can_translate, focus=0, is_thread=False):