Skip to content

Commit cf1df4a

Browse files
author
Hugo Osvaldo Barrera
authored
Merge pull request #352 from pimutils/update-flake8
Fix linting errors with latest flake8
2 parents 57b7ab5 + d6f3995 commit cf1df4a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/test_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ def test_porcelain_precedence(runner, tmpdir):
896896
with patch('todoman.formatters.PorcelainFormatter') as mocked_formatter:
897897
runner.invoke(cli, ['--porcelain', 'list'])
898898

899-
assert mocked_formatter.call_count is 1
899+
assert mocked_formatter.call_count == 1
900900

901901

902902
def test_duplicate_list(tmpdir, runner):
@@ -959,7 +959,7 @@ def test_no_default_priority(tmpdir, runner, create):
959959

960960
db = Database([tmpdir.join('default')], tmpdir.join('/default_list'))
961961
todo = list(db.todos())[0]
962-
assert todo.priority is 0
962+
assert todo.priority == 0
963963

964964
todo_file = tmpdir.join('default').join(todo.filename)
965965
todo_ics = todo_file.read_text('utf-8')

tests/test_ui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def test_todo_editor_priority(
2222
with pytest.raises(ExitMainLoop): # Look at editor._msg_text if this fails
2323
editor._keypress('ctrl s')
2424

25-
assert todo.priority is 0
25+
assert todo.priority == 0
2626

2727

2828
def test_todo_editor_list(

todoman/formatters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def format_datetime(self, dt):
130130
return dt.strftime(self.date_format)
131131

132132
def parse_priority(self, priority):
133-
if priority is None or priority is '':
133+
if priority is None or priority == '':
134134
return None
135135
if priority == 'low':
136136
return 9

0 commit comments

Comments
 (0)