Skip to content

Commit e164fea

Browse files
committed
chore: apply pre-commit
1 parent f5147fe commit e164fea

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/stac_auth_proxy/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
from fastapi import Depends, FastAPI
1212

1313
from .config import Settings
14+
from .handlers import OpenApiSpecHandler, ReverseProxyHandler
1415
from .middleware import AddProcessTimeHeaderMiddleware
15-
from .handlers import ReverseProxyHandler, OpenApiSpecHandler
1616

1717

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

src/stac_auth_proxy/handlers/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Handlers to process requests."""
2+
13
from .open_api_spec import OpenApiSpecHandler
24
from .reverse_proxy import ReverseProxyHandler
35

src/stac_auth_proxy/handlers/open_api_spec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from fastapi import Request, Response
77
from fastapi.routing import APIRoute
88

9-
from .reverse_proxy import ReverseProxyHandler
109
from ..utils import safe_headers
10+
from .reverse_proxy import ReverseProxyHandler
1111

1212
logger = logging.getLogger(__name__)
1313

tests/test_authn.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
import pytest
44
from fastapi.testclient import TestClient
5-
65
from utils import AppFactory
76

8-
97
app_factory = AppFactory(
108
oidc_discovery_url="https://samples.auth0.com/.well-known/openid-configuration",
119
default_public=False,
@@ -38,9 +36,7 @@
3836
],
3937
)
4038
def test_default_public_false(source_api_server, path, method, token_builder):
41-
"""
42-
Private endpoints permit access with a valid token.
43-
"""
39+
"""Private endpoints permit access with a valid token."""
4440
test_app = app_factory(upstream_url=source_api_server)
4541
valid_auth_token = token_builder({})
4642

tests/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
"""Utilities for testing."""
22

3-
from dataclasses import dataclass, field
43
from typing import Callable
4+
55
from stac_auth_proxy import Settings, create_app
66

77

88
class AppFactory:
99
"""Factory for creating test apps with default settings."""
1010

1111
def __init__(self, **defaults):
12+
"""Initialize the factory with default settings."""
1213
self.defaults = defaults
1314

1415
def __call__(self, *, upstream_url, **overrides) -> Callable:
16+
"""Create a new app with the given overrides."""
1517
return create_app(
1618
Settings.model_validate(
1719
{

0 commit comments

Comments
 (0)