Skip to content

Commit b75a2f6

Browse files
committed
chore: apply pre-commit
1 parent 0c5cf4e commit b75a2f6

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

src/stac_auth_proxy/__main__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import uvicorn
22
from uvicorn.config import LOGGING_CONFIG
33

4-
54
LOGGING_CONFIG["loggers"][__package__] = {
65
"level": "DEBUG",
76
"handlers": ["default"],

src/stac_auth_proxy/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
from fastapi import Depends, FastAPI
1010
from fastapi.security import OpenIdConnect
1111

12-
from .proxy import ReverseProxy
1312
from .config import Settings
14-
from .middleware import AddProcessTimeHeaderMiddleware
1513
from .handlers import OpenApiSpecHandler
14+
from .middleware import AddProcessTimeHeaderMiddleware
15+
from .proxy import ReverseProxy
1616

1717

1818
def create_app(settings: Optional[Settings] = None) -> FastAPI:

src/stac_auth_proxy/handlers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from dataclasses import dataclass
21
import logging
2+
from dataclasses import dataclass
33

44
from fastapi import Request, Response
55
from fastapi.routing import APIRoute
@@ -17,8 +17,7 @@ class OpenApiSpecHandler:
1717
auth_scheme_name: str = "oidcAuth"
1818

1919
async def dispatch(self, req: Request, res: Response):
20-
"""
21-
Proxy the OpenAPI spec from the upstream STAC API, updating it with OIDC security
20+
"""Proxy the OpenAPI spec from the upstream STAC API, updating it with OIDC security
2221
requirements.
2322
"""
2423
oidc_spec_response = await self.proxy.proxy_request(req)

src/stac_auth_proxy/proxy.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
import httpx
66
from fastapi import Request
7+
from starlette.background import BackgroundTask
78
from starlette.datastructures import MutableHeaders
89
from starlette.responses import StreamingResponse
9-
from starlette.background import BackgroundTask
10-
1110

1211
logger = logging.getLogger(__name__)
1312

src/stac_auth_proxy/utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33

44
def safe_headers(headers: Headers) -> dict[str, str]:
5-
"""
6-
Scrub headers that should not be proxied to the client.
7-
"""
5+
"""Scrub headers that should not be proxied to the client."""
86
excluded_headers = [
97
"content-length",
108
"content-encoding",

0 commit comments

Comments
 (0)