mirror of
https://github.com/ihabunek/toot
synced 2025-01-10 16:52:40 +01:00
Fix flake8 errors
This commit is contained in:
parent
8595e39f4c
commit
ded7a0c50d
3
.flake8
3
.flake8
@ -1,3 +1,4 @@
|
|||||||
[flake8]
|
[flake8]
|
||||||
max-line-length=100
|
exclude=build,tests
|
||||||
ignore=E128
|
ignore=E128
|
||||||
|
max-line-length=120
|
||||||
|
@ -521,7 +521,7 @@ class TUI(urwid.Frame):
|
|||||||
else:
|
else:
|
||||||
self.footer.set_error_message("Server returned empty translation")
|
self.footer.set_error_message("Server returned empty translation")
|
||||||
response = None
|
response = None
|
||||||
except:
|
except Exception:
|
||||||
response = None
|
response = None
|
||||||
self.footer.set_error_message("Translate server error")
|
self.footer.set_error_message("Translate server error")
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ def parse_html(html):
|
|||||||
paragraphs = [re.split("<br */?>", p) for p in paragraphs if p]
|
paragraphs = [re.split("<br */?>", p) for p in paragraphs if p]
|
||||||
|
|
||||||
# Convert each line in each paragraph to plain text:
|
# 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):
|
def format_content(content):
|
||||||
|
Loading…
Reference in New Issue
Block a user