Skip to content

Commit 419280d

Browse files
committed
Formatting
1 parent f547e16 commit 419280d

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

soauth/core/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
One-stop functionality for decoding access tokens
33
"""
44

5+
from cachetools import TTLCache, cached
56
from pydantic import ValidationError
6-
from cachetools import cached, TTLCache
77

88
from soauth.core.tokens import KeyDecodeError, reconstruct_payload
99
from soauth.core.user import UserData

soauth/core/models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class KeyRefreshResponse(BaseModel):
2222
refresh_token_expires: datetime
2323

2424

25-
2625
class APIKeyCreationResponse(BaseModel):
2726
app_name: str
2827
app_id: UUID

soauth/database/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def get_effective_grants(self, include_groups: bool = True) -> set[str]:
113113
def has_effective_grant(self, grant: str) -> bool:
114114
"""Check if user has grant either individually or through groups."""
115115
return grant in self.get_effective_grants()
116-
116+
117117
def to_public_profile_data(self) -> dict[str, str | None]:
118118
"""Convert user data to public profile format."""
119119
return {

soauth/service/github.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,9 @@ async def user_from_access_token(
280280
username = user_info["login"].lower()
281281
profile_image = user_info["avatar_url"]
282282
log = log.bind(
283-
user_name=username, email=user_info["email"], full_name=user_info["name"],
283+
user_name=username,
284+
email=user_info["email"],
285+
full_name=user_info["name"],
284286
profile_image=profile_image,
285287
)
286288

soauth/service/user.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ async def create(
4444

4545
try:
4646
user = User(
47-
user_name=user_name, email=email, grants=grants, full_name=full_name,
47+
user_name=user_name,
48+
email=email,
49+
grants=grants,
50+
full_name=full_name,
4851
gh_profile_image_url=profile_image,
4952
)
5053
except IntegrityError:

soauth/toolkit/starlette.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ async def lifespan(app: FastAPI):
3535
There is a global setup function that can be used defined in the `fastapi.py`
3636
file, for FastAPI services.
3737
"""
38+
3839
import json
3940

4041
import httpx
@@ -302,7 +303,7 @@ def key_expired_handler(request: Request, exc: KeyExpiredError) -> RedirectRespo
302303
return response
303304

304305
content = KeyRefreshResponse.model_validate_json(response.content)
305-
306+
306307
response = RedirectResponse(request.url, status_code=302)
307308

308309
response.set_cookie(

0 commit comments

Comments
 (0)