mirror of
https://github.com/ihabunek/toot.git
synced 2024-11-03 04:17:21 -05:00
cleanup to make flake8 happy
This commit is contained in:
parent
1e1b0c49be
commit
481cf89e3a
@ -1,5 +1,6 @@
|
|||||||
import click
|
import click
|
||||||
import pytest
|
import pytest
|
||||||
|
import sys
|
||||||
|
|
||||||
from toot.cli.validators import validate_duration
|
from toot.cli.validators import validate_duration
|
||||||
from toot.wcstring import wc_wrap, trunc, pad, fit_text
|
from toot.wcstring import wc_wrap, trunc, pad, fit_text
|
||||||
|
@ -27,10 +27,9 @@ COLOR_OPTIONS = ", ".join(TUI_COLORS.keys())
|
|||||||
@click.option(
|
@click.option(
|
||||||
"-s", "--cache-size",
|
"-s", "--cache-size",
|
||||||
callback=validate_cache_size,
|
callback=validate_cache_size,
|
||||||
help=f"""Specify the image cache maximum size in megabytes. Default: 10MB.
|
help="""Specify the image cache maximum size in megabytes. Default: 10MB.
|
||||||
Minimum: 1MB."""
|
Minimum: 1MB."""
|
||||||
)
|
)
|
||||||
|
|
||||||
@pass_context
|
@pass_context
|
||||||
def tui(
|
def tui(
|
||||||
ctx: Context,
|
ctx: Context,
|
||||||
|
@ -85,7 +85,7 @@ def validate_cache_size(ctx: click.Context, param: str, value: Optional[str]) ->
|
|||||||
size = int(value)
|
size = int(value)
|
||||||
else:
|
else:
|
||||||
raise click.BadParameter("Cache size must be numeric.")
|
raise click.BadParameter("Cache size must be numeric.")
|
||||||
|
|
||||||
if size > 1024:
|
if size > 1024:
|
||||||
raise click.BadParameter("Cache size too large: 1024MB maximum.")
|
raise click.BadParameter("Cache size too large: 1024MB maximum.")
|
||||||
elif size < 1:
|
elif size < 1:
|
||||||
|
@ -7,11 +7,9 @@ import webbrowser
|
|||||||
from toot import __version__
|
from toot import __version__
|
||||||
from toot import api
|
from toot import api
|
||||||
|
|
||||||
from toot.utils import format_content
|
from toot.tui.utils import highlight_keys, add_corners
|
||||||
from toot.tui.utils import highlight_hashtags, highlight_keys, add_corners
|
|
||||||
from toot.tui.widgets import Button, EditBox, SelectableText, EmojiText
|
from toot.tui.widgets import Button, EditBox, SelectableText, EmojiText
|
||||||
from toot.tui.richtext import html_to_widgets
|
from toot.tui.richtext import html_to_widgets
|
||||||
from toot import api
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from term_image.image import AutoImage
|
from term_image.image import AutoImage
|
||||||
from term_image.widget import UrwidImage
|
from term_image.widget import UrwidImage
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import logging
|
import logging
|
||||||
import math
|
import math
|
||||||
import sys
|
|
||||||
import urwid
|
import urwid
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
|
||||||
@ -8,7 +7,6 @@ from typing import List, Optional
|
|||||||
|
|
||||||
from toot.tui import app
|
from toot.tui import app
|
||||||
|
|
||||||
from toot.utils import format_content
|
|
||||||
from toot.tui.utils import can_render_pixels, add_corners
|
from toot.tui.utils import can_render_pixels, add_corners
|
||||||
from toot.tui.richtext import html_to_widgets, url_to_widget
|
from toot.tui.richtext import html_to_widgets, url_to_widget
|
||||||
from toot.utils.datetime import parse_datetime, time_ago
|
from toot.utils.datetime import parse_datetime, time_ago
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
import base64
|
import base64
|
||||||
import re
|
import re
|
||||||
import shutil
|
|
||||||
import subprocess
|
|
||||||
import sys
|
import sys
|
||||||
import urwid
|
import urwid
|
||||||
import math
|
import math
|
||||||
|
Loading…
Reference in New Issue
Block a user