Skip to content

Commit 054b323

Browse files
committed
ci: add format chekcing
1 parent 13884be commit 054b323

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
run: |
2626
pdm install
2727
28+
- name: Check format
29+
run: pdm run black logto samples --check
30+
2831
- name: Build
2932
run: pdm build
3033

logto/OidcCore.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,16 @@ async def fetchTokenByRefreshToken(
140140
"client_id": clientId,
141141
"client_secret": clientSecret,
142142
"refresh_token": refreshToken,
143-
"resource": resource
144-
if not resource.startswith(OrganizationUrnPrefix)
145-
else None,
146-
"organization_id": resource[len(OrganizationUrnPrefix) :]
147-
if resource.startswith(OrganizationUrnPrefix)
148-
else None,
143+
"resource": (
144+
resource
145+
if not resource.startswith(OrganizationUrnPrefix)
146+
else None
147+
),
148+
"organization_id": (
149+
resource[len(OrganizationUrnPrefix) :]
150+
if resource.startswith(OrganizationUrnPrefix)
151+
else None
152+
),
149153
}
150154
),
151155
) as resp:

0 commit comments

Comments
 (0)