kopia lustrzana https://github.com/simonw/datasette
Removed unnecessary imports with autoflake
I ran this: autoflake --in-place --recursive tests datasetteisort
rodzic
ecae805d37
commit
6a348e3c2c
|
@ -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
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import json
|
||||
import re
|
||||
import urllib
|
||||
|
||||
from datasette import hookimpl
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import json
|
||||
from subprocess import check_call, check_output
|
||||
|
||||
import click
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2,7 +2,6 @@ import base64
|
|||
import hashlib
|
||||
import imp
|
||||
import json
|
||||
import numbers
|
||||
import os
|
||||
import re
|
||||
import shlex
|
||||
|
|
|
@ -4,7 +4,6 @@ import itertools
|
|||
import re
|
||||
import time
|
||||
import urllib
|
||||
from html import escape
|
||||
|
||||
import jinja2
|
||||
import pint
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
from collections import namedtuple
|
||||
|
||||
import pytest
|
||||
|
||||
from datasette.facets import ArrayFacet, ColumnFacet, DateFacet, ManyToManyFacet
|
||||
|
|
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue