aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/web.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-10-27 14:19:29 -0700
committerBryan Newbold <bnewbold@archive.org>2021-10-27 18:25:58 -0700
commit956e64f47f7d47f2539cd6575c25ec0b6a33e567 (patch)
treeb6775a940f21b3dabdd3e7de3398c2da874914fd /fatcat_scholar/web.py
parent02249d03d086e71a589733280a2f5e32990f72b1 (diff)
downloadfatcat-scholar-956e64f47f7d47f2539cd6575c25ec0b6a33e567.tar.gz
fatcat-scholar-956e64f47f7d47f2539cd6575c25ec0b6a33e567.zip
re-style imports (isort) on all core python files
Diffstat (limited to 'fatcat_scholar/web.py')
-rw-r--r--fatcat_scholar/web.py31
1 files changed, 15 insertions, 16 deletions
diff --git a/fatcat_scholar/web.py b/fatcat_scholar/web.py
index 8cf2c88..e835c01 100644
--- a/fatcat_scholar/web.py
+++ b/fatcat_scholar/web.py
@@ -6,41 +6,40 @@ So far there are few endpoints, so we just put them all here!
import logging
import urllib.parse
-from typing import Optional, Any, List, Dict
+from typing import Any, Dict, List, Optional
-from pydantic import BaseModel
import babel.numbers
import babel.support
-from fastapi import FastAPI, APIRouter, Request, Depends, Response, HTTPException, Query
-from fastapi.staticfiles import StaticFiles
+import fatcat_openapi_client
+import sentry_sdk
+from fastapi import APIRouter, Depends, FastAPI, HTTPException, Query, Request, Response
+from fastapi.middleware.cors import CORSMiddleware
from fastapi.responses import (
- PlainTextResponse,
- JSONResponse,
FileResponse,
+ JSONResponse,
+ PlainTextResponse,
RedirectResponse,
)
-from fastapi.middleware.cors import CORSMiddleware
-import fatcat_openapi_client
-import sentry_sdk
+from fastapi.staticfiles import StaticFiles
+from pydantic import BaseModel
from sentry_sdk.integrations.asgi import SentryAsgiMiddleware
-from starlette_prometheus import metrics, PrometheusMiddleware
from starlette.exceptions import HTTPException as StarletteHTTPException
+from starlette_prometheus import PrometheusMiddleware, metrics
-from fatcat_scholar.config import settings, GIT_REVISION
+from fatcat_scholar.config import GIT_REVISION, settings
from fatcat_scholar.hacks import (
Jinja2Templates,
- parse_accept_lang,
make_access_redirect_url,
+ parse_accept_lang,
)
+from fatcat_scholar.schema import ScholarDoc
from fatcat_scholar.search import (
- process_query,
- FulltextQuery,
FulltextHits,
+ FulltextQuery,
es_scholar_index_alive,
get_es_scholar_doc,
+ process_query,
)
-from fatcat_scholar.schema import ScholarDoc
-
logger = logging.getLogger()