Skip to content

Commit

Permalink
fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Sep 2, 2020
1 parent 05d02d4 commit fe13274
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions humanfriendly/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,8 @@ def test_spinner(self):
.replace(ANSI_HIDE_CURSOR, ''))
lines = [line for line in output.split(ANSI_ERASE_LINE) if line]
self.assertTrue(len(lines) > 0)
self.assertTrue(all('test spinner' in l for l in lines))
self.assertTrue(all('%' in l for l in lines))
self.assertTrue(all('test spinner' in line for line in lines))
self.assertTrue(all('%' in line for line in lines))
self.assertEqual(sorted(set(lines)), sorted(lines))

def test_automatic_spinner(self):
Expand Down Expand Up @@ -952,7 +952,7 @@ def test_cli(self):
# https://github.com/xolox/python-humanfriendly/issues/28
returncode, output = run_cli(main, '--demo')
assert returncode == 0
lines = [ansi_strip(l) for l in output.splitlines()]
lines = [ansi_strip(line) for line in output.splitlines()]
assert "Text styles:" in lines
assert "Foreground colors:" in lines
assert "Background colors:" in lines
Expand Down
2 changes: 1 addition & 1 deletion humanfriendly/usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def render_usage(text):
('\n\n'.join(render_paragraph(p, meta_variables) for p in split_paragraphs(description))).rstrip(),
])
csv_lines = csv_buffer.getvalue().splitlines()
output.append('\n'.join(' %s' % l for l in csv_lines))
output.append('\n'.join(' %s' % line for line in csv_lines))
logger.debug("Rendered output: %s", output)
return '\n\n'.join(trim_empty_lines(o) for o in output)

Expand Down

0 comments on commit fe13274

Please sign in to comment.