Skip to content

Commit

Permalink
Merge pull request #352 from pimutils/update-flake8
Browse files Browse the repository at this point in the history
Fix linting errors with latest flake8
  • Loading branch information
Hugo Osvaldo Barrera authored Feb 3, 2019
2 parents 57b7ab5 + d6f3995 commit cf1df4a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ def test_porcelain_precedence(runner, tmpdir):
with patch('todoman.formatters.PorcelainFormatter') as mocked_formatter:
runner.invoke(cli, ['--porcelain', 'list'])

assert mocked_formatter.call_count is 1
assert mocked_formatter.call_count == 1


def test_duplicate_list(tmpdir, runner):
Expand Down Expand Up @@ -959,7 +959,7 @@ def test_no_default_priority(tmpdir, runner, create):

db = Database([tmpdir.join('default')], tmpdir.join('/default_list'))
todo = list(db.todos())[0]
assert todo.priority is 0
assert todo.priority == 0

todo_file = tmpdir.join('default').join(todo.filename)
todo_ics = todo_file.read_text('utf-8')
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_todo_editor_priority(
with pytest.raises(ExitMainLoop): # Look at editor._msg_text if this fails
editor._keypress('ctrl s')

assert todo.priority is 0
assert todo.priority == 0


def test_todo_editor_list(
Expand Down
2 changes: 1 addition & 1 deletion todoman/formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def format_datetime(self, dt):
return dt.strftime(self.date_format)

def parse_priority(self, priority):
if priority is None or priority is '':
if priority is None or priority == '':
return None
if priority == 'low':
return 9
Expand Down

0 comments on commit cf1df4a

Please sign in to comment.