Skip to content

Commit

Permalink
no need for a ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
amtrivedi91 committed Aug 30, 2016
1 parent a4a1267 commit 5022585
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion powerline_shell_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def dirty(self):
self.staged,
self.conflicted,
]
return (True if sum(qualifiers) > 0 else False)
return sum(qualifiers) > 0

def __getitem__(self, _key):
return getattr(self, _key)
Expand Down
3 changes: 3 additions & 0 deletions test/repo_stats_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ def setUp(self):
self.repo_stats.not_staged = 1
self.repo_stats.conflicted = 4

def test_dirty(self):
self.assertTrue(self.repo_stats.dirty)

def test_simple(self):
self.assertEqual(self.repo_stats.untracked, 0)

Expand Down

0 comments on commit 5022585

Please sign in to comment.