Fix flake8 errors
This commit is contained in:
parent
8595e39f4c
commit
ded7a0c50d
3 changed files with 4 additions and 3 deletions
3
.flake8
3
.flake8
|
@ -1,3 +1,4 @@
|
|||
[flake8]
|
||||
max-line-length=100
|
||||
exclude=build,tests
|
||||
ignore=E128
|
||||
max-line-length=120
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ def parse_html(html):
|
|||
paragraphs = [re.split("<br */?>", 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):
|
||||
|
|
Loading…
Reference in a new issue