Skip to content

Commit

Permalink
LineCountBear.py: Add default values
Browse files Browse the repository at this point in the history
Set default values for min_lines_per_file and max_lines_per_file.

Fixes coala#1477
  • Loading branch information
damian1996 committed Apr 21, 2018
1 parent c086e4a commit 20cdaf4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bears/general/LineCountBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def _get_blank_line_count(self, file):
list(filter(lambda x: re.match(r'^\s*$', x), file)))
return num_blank_lines

def run(self, filename, file, min_lines_per_file: int,
max_lines_per_file: int,
def run(self, filename, file, min_lines_per_file: int = 1,
max_lines_per_file: int = 1000,
exclude_blank_lines: bool = False,
):
"""
Expand Down
1 change: 0 additions & 1 deletion tests/general/LineCountBearTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def test_one_element_range(self):
filename='default')

def test_default_min_lines_per_file(self):
self.section.append(Setting('min_lines_per_file', 1))
self.section.append(Setting('max_lines_per_file', 2))
self.section.append(Setting('exclude_blank_lines', True))
self.check_results(
Expand Down

0 comments on commit 20cdaf4

Please sign in to comment.