Skip to content

Commit 481cf89

Browse files
committed
cleanup to make flake8 happy
1 parent 1e1b0c4 commit 481cf89

File tree

6 files changed

+4
-10
lines changed

6 files changed

+4
-10
lines changed

tests/test_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import click
22
import pytest
3+
import sys
34

45
from toot.cli.validators import validate_duration
56
from toot.wcstring import wc_wrap, trunc, pad, fit_text

toot/cli/tui.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@
2727
@click.option(
2828
"-s", "--cache-size",
2929
callback=validate_cache_size,
30-
help=f"""Specify the image cache maximum size in megabytes. Default: 10MB.
30+
help="""Specify the image cache maximum size in megabytes. Default: 10MB.
3131
Minimum: 1MB."""
3232
)
33-
3433
@pass_context
3534
def tui(
3635
ctx: Context,

toot/cli/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def validate_cache_size(ctx: click.Context, param: str, value: Optional[str]) ->
8585
size = int(value)
8686
else:
8787
raise click.BadParameter("Cache size must be numeric.")
88-
88+
8989
if size > 1024:
9090
raise click.BadParameter("Cache size too large: 1024MB maximum.")
9191
elif size < 1:

toot/tui/overlays.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@
77
from toot import __version__
88
from toot import api
99

10-
from toot.utils import format_content
11-
from toot.tui.utils import highlight_hashtags, highlight_keys, add_corners
10+
from toot.tui.utils import highlight_keys, add_corners
1211
from toot.tui.widgets import Button, EditBox, SelectableText, EmojiText
1312
from toot.tui.richtext import html_to_widgets
14-
from toot import api
1513
from PIL import Image
1614
from term_image.image import AutoImage
1715
from term_image.widget import UrwidImage

toot/tui/timeline.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import logging
22
import math
3-
import sys
43
import urwid
54
import webbrowser
65

76
from typing import List, Optional
87

98
from toot.tui import app
109

11-
from toot.utils import format_content
1210
from toot.tui.utils import can_render_pixels, add_corners
1311
from toot.tui.richtext import html_to_widgets, url_to_widget
1412
from toot.utils.datetime import parse_datetime, time_ago

toot/tui/utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import base64
22
import re
3-
import shutil
4-
import subprocess
53
import sys
64
import urwid
75
import math

0 commit comments

Comments
 (0)