Python-3-only clean ups discovered by pyupgrade

https://github.com/asottile/pyupgrade

> A tool to automatically upgrade syntax for newer versions of the
> language.

- Drop u str prefix
- Drop base object inheritance
- Drop args to super()
- Use set literals
- Use dict comprehension
- Use set comprehension
This commit is contained in:
Jon Dufresne
2019-03-17 12:49:36 -07:00
parent 42c8fbd6f3
commit f210475489
31 changed files with 73 additions and 77 deletions

View File

@@ -54,9 +54,9 @@ def test_todo(app, status, warning):
# check handled event
assert len(todos) == 3
assert set(todo[1].astext() for todo in todos) == {'todo in foo',
'todo in bar',
'todo in param field'}
assert {todo[1].astext() for todo in todos} == {'todo in foo',
'todo in bar',
'todo in param field'}
@pytest.mark.sphinx('html', testroot='ext-todo', freshenv=True,
@@ -92,9 +92,9 @@ def test_todo_not_included(app, status, warning):
# check handled event
assert len(todos) == 3
assert set(todo[1].astext() for todo in todos) == {'todo in foo',
'todo in bar',
'todo in param field'}
assert {todo[1].astext() for todo in todos} == {'todo in foo',
'todo in bar',
'todo in param field'}
@pytest.mark.sphinx('latex', testroot='ext-todo', freshenv=True,