diff --git a/datasette/cli.py b/datasette/cli.py index adcb07d9..6eab93af 100644 --- a/datasette/cli.py +++ b/datasette/cli.py @@ -1,6 +1,5 @@ import asyncio import json -import os import shutil import sys from subprocess import call @@ -113,7 +112,6 @@ class PublishAliases(click.Group): @cli.group(cls=PublishAliases) def publish(): "Publish specified SQLite database files to the internet along with a Datasette-powered interface and API" - pass # Register publish plugins diff --git a/datasette/facets.py b/datasette/facets.py index f1614c0d..03baaf08 100644 --- a/datasette/facets.py +++ b/datasette/facets.py @@ -1,5 +1,4 @@ import json -import re import urllib from datasette import hookimpl diff --git a/datasette/publish/cloudrun.py b/datasette/publish/cloudrun.py index 153bb86e..f64ca3ec 100644 --- a/datasette/publish/cloudrun.py +++ b/datasette/publish/cloudrun.py @@ -1,4 +1,3 @@ -import json from subprocess import check_call, check_output import click diff --git a/datasette/renderer.py b/datasette/renderer.py index 326c4480..b2c71c40 100644 --- a/datasette/renderer.py +++ b/datasette/renderer.py @@ -21,7 +21,6 @@ def convert_specific_columns_to_json(rows, columns, json_cols): value = json.loads(value) except (TypeError, ValueError) as e: print(e) - pass new_row.append(value) new_rows.append(new_row) return new_rows diff --git a/datasette/utils/__init__.py b/datasette/utils/__init__.py index c8f8049e..d1999af5 100644 --- a/datasette/utils/__init__.py +++ b/datasette/utils/__init__.py @@ -2,7 +2,6 @@ import base64 import hashlib import imp import json -import numbers import os import re import shlex diff --git a/datasette/views/base.py b/datasette/views/base.py index c6a61109..e726ea61 100644 --- a/datasette/views/base.py +++ b/datasette/views/base.py @@ -4,7 +4,6 @@ import itertools import re import time import urllib -from html import escape import jinja2 import pint diff --git a/tests/conftest.py b/tests/conftest.py index 6cc1f044..fb5a8a28 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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") diff --git a/tests/test_facets.py b/tests/test_facets.py index b483a914..536f7808 100644 --- a/tests/test_facets.py +++ b/tests/test_facets.py @@ -1,5 +1,3 @@ -from collections import namedtuple - import pytest from datasette.facets import ArrayFacet, ColumnFacet, DateFacet, ManyToManyFacet diff --git a/tests/test_lint.py b/tests/test_lint.py index 69c8ab5d..52d6e40f 100644 --- a/tests/test_lint.py +++ b/tests/test_lint.py @@ -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