kopia lustrzana https://github.com/simonw/datasette
Removed unnecessary imports with autoflake
I ran this: autoflake --in-place --recursive tests datasettepull/524/head
rodzic
ecae805d37
commit
6a348e3c2c
|
@ -1,6 +1,5 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
import json
|
import json
|
||||||
import os
|
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
from subprocess import call
|
from subprocess import call
|
||||||
|
@ -113,7 +112,6 @@ class PublishAliases(click.Group):
|
||||||
@cli.group(cls=PublishAliases)
|
@cli.group(cls=PublishAliases)
|
||||||
def publish():
|
def publish():
|
||||||
"Publish specified SQLite database files to the internet along with a Datasette-powered interface and API"
|
"Publish specified SQLite database files to the internet along with a Datasette-powered interface and API"
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
# Register publish plugins
|
# Register publish plugins
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import json
|
import json
|
||||||
import re
|
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
from datasette import hookimpl
|
from datasette import hookimpl
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import json
|
|
||||||
from subprocess import check_call, check_output
|
from subprocess import check_call, check_output
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
|
|
@ -21,7 +21,6 @@ def convert_specific_columns_to_json(rows, columns, json_cols):
|
||||||
value = json.loads(value)
|
value = json.loads(value)
|
||||||
except (TypeError, ValueError) as e:
|
except (TypeError, ValueError) as e:
|
||||||
print(e)
|
print(e)
|
||||||
pass
|
|
||||||
new_row.append(value)
|
new_row.append(value)
|
||||||
new_rows.append(new_row)
|
new_rows.append(new_row)
|
||||||
return new_rows
|
return new_rows
|
||||||
|
|
|
@ -2,7 +2,6 @@ import base64
|
||||||
import hashlib
|
import hashlib
|
||||||
import imp
|
import imp
|
||||||
import json
|
import json
|
||||||
import numbers
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import shlex
|
import shlex
|
||||||
|
|
|
@ -4,7 +4,6 @@ import itertools
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
import urllib
|
import urllib
|
||||||
from html import escape
|
|
||||||
|
|
||||||
import jinja2
|
import jinja2
|
||||||
import pint
|
import pint
|
||||||
|
|
|
@ -13,6 +13,7 @@ def pytest_unconfigure(config):
|
||||||
def pytest_collection_modifyitems(items):
|
def pytest_collection_modifyitems(items):
|
||||||
# Ensure test_black.py and test_inspect.py run first before any asyncio code kicks in
|
# 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_black")
|
||||||
|
move_to_front(items, "test_isort")
|
||||||
move_to_front(items, "test_inspect_cli")
|
move_to_front(items, "test_inspect_cli")
|
||||||
move_to_front(items, "test_inspect_cli_writes_to_file")
|
move_to_front(items, "test_inspect_cli_writes_to_file")
|
||||||
move_to_front(items, "test_spatialite_error_if_attempt_to_open_spatialite")
|
move_to_front(items, "test_spatialite_error_if_attempt_to_open_spatialite")
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from collections import namedtuple
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from datasette.facets import ArrayFacet, ColumnFacet, DateFacet, ManyToManyFacet
|
from datasette.facets import ArrayFacet, ColumnFacet, DateFacet, ManyToManyFacet
|
||||||
|
|
|
@ -34,5 +34,7 @@ def test_isort(path):
|
||||||
result = isort.SortImports(path, check=True)
|
result = isort.SortImports(path, check=True)
|
||||||
assert (
|
assert (
|
||||||
not result.incorrectly_sorted
|
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
|
sys.stdout = stdout
|
||||||
|
|
Ładowanie…
Reference in New Issue