Skip to content

Commit 0e30cd2

Browse files
committed
Apply black
1 parent 6258daa commit 0e30cd2

File tree

9 files changed

+21
-18
lines changed

9 files changed

+21
-18
lines changed

src/oic/extension/sts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
:license: Apache2, see LICENSE for more details.
66
77
"""
8+
89
import json
910

1011
from oic.oauth2.message import OPTIONAL_LIST_OF_SP_SEP_STRINGS

src/oic/oic/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,9 +1240,9 @@ def match_preferences(self, pcr=None, issuer=None):
12401240
def store_registration_info(self, reginfo):
12411241
self.registration_response = reginfo
12421242
if "token_endpoint_auth_method" not in self.registration_response:
1243-
self.registration_response[
1244-
"token_endpoint_auth_method" # nosec
1245-
] = "client_secret_basic"
1243+
self.registration_response["token_endpoint_auth_method"] = ( # nosec
1244+
"client_secret_basic"
1245+
)
12461246
self.client_id = reginfo["client_id"]
12471247
try:
12481248
self.client_secret = reginfo["client_secret"]

src/oic/oic/consumer.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,7 @@ def _parse_authz(self, query="", **kwargs):
367367
self.redirect_uris = [self.sdb[_state]["redirect_uris"]]
368368
return aresp, _state
369369

370-
def parse_authz(
371-
self, query="", **kwargs
372-
) -> Union[
370+
def parse_authz(self, query="", **kwargs) -> Union[
373371
http_util.BadRequest,
374372
Tuple[
375373
Optional[AuthorizationResponse],

src/oic/utils/clientdb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Client management databases."""
2+
23
from abc import ABCMeta
34
from abc import abstractmethod
45
from urllib.parse import quote

src/oic/utils/rp/oauth2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ def callback(self, response, session, format="dict"):
116116
:return:
117117
"""
118118
if self.behaviour["response_type"] == "code":
119-
respcls: Union[
120-
Type[AuthorizationResponse], Type[AccessTokenResponse]
121-
] = AuthorizationResponse
119+
respcls: Union[Type[AuthorizationResponse], Type[AccessTokenResponse]] = (
120+
AuthorizationResponse
121+
)
122122
else:
123123
respcls = AccessTokenResponse
124124

src/oic/utils/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
The settings make use of `pydantic-settings <https://docs.pydantic.dev/usage/settings/>`_ library.
1313
It is possible to instance them directly or use environment values to fill the settings.
1414
"""
15+
1516
from typing import Optional
1617
from typing import Tuple
1718
from typing import Union

tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Pytest fixtures for testing."""
2+
23
from typing import Any
34
from typing import Dict
45

tests/test_clientdb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Unittests for ClientDatabases."""
2+
23
import json
34
from operator import itemgetter
45
from typing import Any

tests/test_x_provider.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -512,9 +512,9 @@ def test_password_grant_type_ok(self):
512512
areq = ROPCAccessTokenRequest(
513513
grant_type="password", username="username", password="password"
514514
)
515-
areq[
516-
"client_id"
517-
] = "client1" # Token endpoint would fill that in based on client_authn
515+
areq["client_id"] = (
516+
"client1" # Token endpoint would fill that in based on client_authn
517+
)
518518
resp = self.provider.password_grant_type(areq)
519519

520520
atr = AccessTokenResponse().deserialize(resp.message, "json")
@@ -527,9 +527,9 @@ def test_password_grant_type_no_authn(self):
527527
areq = ROPCAccessTokenRequest(
528528
grant_type="password", username="username", password="password"
529529
)
530-
areq[
531-
"client_id"
532-
] = "client1" # Token endpoint would fill that in based on client_authn
530+
areq["client_id"] = (
531+
"client1" # Token endpoint would fill that in based on client_authn
532+
)
533533
resp = self.provider.password_grant_type(areq)
534534

535535
atr = TokenErrorResponse().deserialize(resp.message, "json")
@@ -542,9 +542,9 @@ def test_password_grant_type_bad(self):
542542
areq = ROPCAccessTokenRequest(
543543
grant_type="password", username="username", password="bad_password"
544544
)
545-
areq[
546-
"client_id"
547-
] = "client1" # Token endpoint would fill that in based on client_authn
545+
areq["client_id"] = (
546+
"client1" # Token endpoint would fill that in based on client_authn
547+
)
548548
resp = self.provider.password_grant_type(areq)
549549

550550
atr = TokenErrorResponse().deserialize(resp.message, "json")

0 commit comments

Comments
 (0)