diff --git a/.flake8 b/.flake8 index 8e61f20..634f10a 100644 --- a/.flake8 +++ b/.flake8 @@ -1,3 +1,4 @@ [flake8] -max-line-length=100 +exclude=build,tests ignore=E128 +max-line-length=120 diff --git a/toot/tui/app.py b/toot/tui/app.py index fe12a87..62ea2c3 100644 --- a/toot/tui/app.py +++ b/toot/tui/app.py @@ -521,7 +521,7 @@ class TUI(urwid.Frame): else: self.footer.set_error_message("Server returned empty translation") response = None - except: + except Exception: response = None self.footer.set_error_message("Translate server error") diff --git a/toot/utils/__init__.py b/toot/utils/__init__.py index f1b0736..40e0daf 100644 --- a/toot/utils/__init__.py +++ b/toot/utils/__init__.py @@ -41,7 +41,7 @@ def parse_html(html): paragraphs = [re.split("
", p) for p in paragraphs if p] # Convert each line in each paragraph to plain text: - return [[get_text(l) for l in p] for p in paragraphs] + return [[get_text(line) for line in p] for p in paragraphs] def format_content(content):