Used isort to re-order my imports

pull/258/head
Simon Willison 2018-05-13 09:58:28 -03:00 zatwierdzone przez Simon Willison
rodzic 3686385551
commit cf1fe693e5
6 zmienionych plików z 59 dodań i 38 usunięć

3
.isort.cfg 100644
Wyświetl plik

@ -0,0 +1,3 @@
[settings]
multi_line_output=3

Wyświetl plik

@ -1,33 +1,40 @@
from sanic import Sanic
from sanic import response
from sanic.exceptions import NotFound, InvalidUsage
from datasette.views.base import RenderMixin, DatasetteError, ureg, HASH_BLOCK_SIZE
from datasette.views.index import IndexView
from datasette.views.database import DatabaseView, DatabaseDownload
from datasette.views.table import TableView, RowView
from jinja2 import Environment, FileSystemLoader, ChoiceLoader, PrefixLoader
import sqlite3
from pathlib import Path
from concurrent import futures
import os
import urllib.parse
import hashlib
import itertools
import json
import hashlib
import os
import sqlite3
import sys
import pluggy
import traceback
import urllib.parse
from concurrent import futures
from pathlib import Path
import pluggy
from jinja2 import ChoiceLoader, Environment, FileSystemLoader, PrefixLoader
from sanic import Sanic, response
from sanic.exceptions import InvalidUsage, NotFound
from datasette.views.base import (
HASH_BLOCK_SIZE,
DatasetteError,
RenderMixin,
ureg
)
from datasette.views.database import DatabaseDownload, DatabaseView
from datasette.views.index import IndexView
from datasette.views.table import RowView, TableView
from . import hookspecs
from .utils import (
detect_fts,
detect_spatialite,
escape_css_string,
escape_sqlite,
detect_spatialite,
get_all_foreign_keys,
get_plugins,
module_from_path,
to_css_class,
to_css_class
)
from . import hookspecs
from .version import __version__
app_root = Path(__file__).parent.parent

Wyświetl plik

@ -1,6 +1,15 @@
from sanic.views import HTTPMethodView
import asyncio
import json
import re
import sqlite3
import threading
import time
import pint
from sanic import response
from sanic.exceptions import NotFound
from sanic.views import HTTPMethodView
from datasette import __version__
from datasette.utils import (
CustomJSONEncoder,
@ -9,15 +18,8 @@ from datasette.utils import (
path_with_added_args,
path_with_ext,
sqlite_timelimit,
to_css_class,
to_css_class
)
import re
import threading
import sqlite3
import asyncio
import time
import json
import pint
connections = threading.local()
ureg = pint.UnitRegistry()

Wyświetl plik

@ -1,8 +1,11 @@
from .base import BaseView
from datasette.utils import validate_sql_select, to_css_class
from sanic import response
import os
from sanic import response
from datasette.utils import to_css_class, validate_sql_select
from .base import BaseView
class DatabaseView(BaseView):

Wyświetl plik

@ -1,8 +1,11 @@
from .base import RenderMixin, HASH_LENGTH
import json
from sanic import response
from datasette.utils import CustomJSONEncoder
from datasette.version import __version__
import json
from .base import HASH_LENGTH, RenderMixin
class IndexView(RenderMixin):

Wyświetl plik

@ -1,6 +1,10 @@
from sanic.request import RequestParameters
from .base import BaseView, DatasetteError, ureg
import sqlite3
import urllib
import jinja2
from sanic.exceptions import NotFound
from sanic.request import RequestParameters
from datasette.utils import (
Filters,
compound_keys_after_sql,
@ -10,11 +14,10 @@ from datasette.utils import (
path_from_row_pks,
path_with_added_args,
to_css_class,
urlsafe_components,
urlsafe_components
)
import sqlite3
import jinja2
import urllib
from .base import BaseView, DatasetteError, ureg
class RowTableShared(BaseView):