Skip to content

Commit

Permalink
Reformats code to satisfy pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
derphilipp committed Feb 3, 2016
1 parent 2678962 commit 84f8866
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion pwgrep/commandline_parser_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,3 @@ def PATH(self):
@property
def invert_match(self):
return self._options.invert_match

2 changes: 1 addition & 1 deletion pwgrep/printer_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def print_result(self, result):
elif isinstance(result, search_result.StdinSearchResult):
self.print_stdin_match(result)
else:
assert False, "Invalid type to print: {}".format(typeof(result))
assert False, "Invalid type to print: {}".format(type(result))


def print_loop_warning(file_name):
Expand Down
3 changes: 0 additions & 3 deletions pwgrep/process.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
from pwgrep import file_helper
from pwgrep import printer_helper
from pwgrep import search_helper
from pwgrep import search_result

import sys


class Grepper(object):
Expand Down
3 changes: 2 additions & 1 deletion pwgrep/search_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def search_in_text_file(self, filename):
def search_in_binary_file(self, filename):
with open(filename, 'rb+') as file_object:
for _, line in enumerate(file_object):
if self.invert_match != bool(self.regexes.regex_bin.search(line)):
if self.invert_match != bool(
self.regexes.regex_bin.search(line)):
return True
return False

Expand Down

0 comments on commit 84f8866

Please sign in to comment.