Removed unnecessary imports with autoflake

I ran this:

    autoflake --in-place --recursive tests datasette
This commit is contained in:
Simon Willison 2019-06-23 22:15:31 -07:00
commit 6a348e3c2c
9 changed files with 4 additions and 10 deletions

View file

@ -13,6 +13,7 @@ def pytest_unconfigure(config):
def pytest_collection_modifyitems(items):
# Ensure test_black.py and test_inspect.py run first before any asyncio code kicks in
move_to_front(items, "test_black")
move_to_front(items, "test_isort")
move_to_front(items, "test_inspect_cli")
move_to_front(items, "test_inspect_cli_writes_to_file")
move_to_front(items, "test_spatialite_error_if_attempt_to_open_spatialite")

View file

@ -1,5 +1,3 @@
from collections import namedtuple
import pytest
from datasette.facets import ArrayFacet, ColumnFacet, DateFacet, ManyToManyFacet

View file

@ -34,5 +34,7 @@ def test_isort(path):
result = isort.SortImports(path, check=True)
assert (
not result.incorrectly_sorted
), "{} has incorrectly sorted imports, fix with 'isort -rc tests && isort -rc datasette && black tests datasette'"
), "{} has incorrectly sorted imports, fix with 'isort -rc tests && isort -rc datasette && black tests datasette'".format(
path
)
sys.stdout = stdout