From d2979b12fb4913baaffbb393105bc10ef22c01ff Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Fri, 15 May 2020 07:54:57 -0500 Subject: [PATCH] Placate flake8 3.8 --- pudb/settings.py | 2 +- pudb/source_view.py | 2 +- test/test_lowlevel.py | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pudb/settings.py b/pudb/settings.py index 1418bfc..18583ed 100644 --- a/pudb/settings.py +++ b/pudb/settings.py @@ -575,7 +575,7 @@ def load_breakpoints(): except IOError: pass else: - lines.extend([l.strip() for l in rc_file.readlines()]) + lines.extend([line.strip() for line in rc_file.readlines()]) rc_file.close() return parse_breakpoints(lines) diff --git a/pudb/source_view.py b/pudb/source_view.py index 3c01b57..7b68fe4 100644 --- a/pudb/source_view.py +++ b/pudb/source_view.py @@ -303,7 +303,7 @@ def format_source(debugger_ui, lines, breakpoints): if subself.current_line: shipout_line() - highlight("".join(l.expandtabs(TABSTOP) for l in lines), + highlight("".join(line.expandtabs(TABSTOP) for line in lines), PythonLexer(stripnl=False), UrwidFormatter()) return result diff --git a/test/test_lowlevel.py b/test/test_lowlevel.py index 9d1eafc..8262de2 100644 --- a/test/test_lowlevel.py +++ b/test/test_lowlevel.py @@ -5,7 +5,7 @@ from pudb.py3compat import PY3 def test_detect_encoding_nocookie(): lines = [u'Test Проверка'] - lines = [l.encode('utf-8') for l in lines] + lines = [line.encode('utf-8') for line in lines] encoding, _ = detect_encoding(iter(lines)) assert encoding == 'utf-8' @@ -16,7 +16,7 @@ def test_detect_encoding_cookie(): u'Test', u'Проверка' ] - lines = [l.encode('utf-8') for l in lines] + lines = [line.encode('utf-8') for line in lines] encoding, _ = detect_encoding(iter(lines)) assert encoding == 'utf-8' @@ -27,11 +27,12 @@ def test_decode_lines(): u'Test', u'Проверка', ] - lines = [l.encode('utf-8') for l in unicode_lines] + lines = [line.encode('utf-8') for line in unicode_lines] if PY3: assert unicode_lines == list(decode_lines(iter(lines))) else: - assert [l.decode('utf-8') for l in lines] == list(decode_lines(iter(lines))) + assert [line.decode('utf-8') + for line in lines] == list(decode_lines(iter(lines))) # {{{ remove common indentation -- GitLab