Skip to content

Commit

Permalink
Fix pylint.
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile committed Jun 1, 2014
1 parent f961d8f commit 00d5904
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pre_commit_hooks/tests_should_end_in_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ def validate_files(argv):
retcode = 0
for filename in argv:
if (
not filename.endswith('_test.py') and
not filename.endswith('__init__.py') and
not filename.endswith('/conftest.py')
not filename.endswith('_test.py') and
not filename.endswith('__init__.py') and
not filename.endswith('/conftest.py')
):
retcode = 1
print('{0} does not end in _test.py'.format(filename))
Expand Down
8 changes: 4 additions & 4 deletions tests/trailing_whitespace_fixer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
def test_fixes_trailing_whitespace(tmpdir):
with local.cwd(tmpdir.strpath):
for filename, contents in (
('foo.py', 'foo \nbar \n'),
('bar.py', 'bar\t\nbaz\t\n'),
('foo.py', 'foo \nbar \n'),
('bar.py', 'bar\t\nbaz\t\n'),
):
with open(filename, 'w') as f:
f.write(contents) # pragma: no cover (python 2.6 coverage bug)
Expand All @@ -16,8 +16,8 @@ def test_fixes_trailing_whitespace(tmpdir):
assert ret == 1

for filename, after_contents in (
('foo.py', 'foo\nbar\n'),
('bar.py', 'bar\nbaz\n'),
('foo.py', 'foo\nbar\n'),
('bar.py', 'bar\nbaz\n'),
):
assert open(filename).read() == after_contents

Expand Down

0 comments on commit 00d5904

Please sign in to comment.