From acba8dc47a5fa96e40d1b1a8cd62f2ce28552128 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 30 May 2024 17:39:03 -0500 Subject: [PATCH] fix: lint test fix --- src/keycloak/connection.py | 1 + src/keycloak/keycloak_admin.py | 2 +- src/keycloak/keycloak_uma.py | 5 +++++ tests/test_keycloak_admin.py | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/keycloak/connection.py b/src/keycloak/connection.py index a25358b..b57b798 100644 --- a/src/keycloak/connection.py +++ b/src/keycloak/connection.py @@ -92,6 +92,7 @@ class ConnectionManager(object): self.async_s.transport = httpx.AsyncHTTPTransport(retries=1) async def aclose(self): + """Close the async connection on delete.""" if hasattr(self, "_s"): await self.async_s.aclose() diff --git a/src/keycloak/keycloak_admin.py b/src/keycloak/keycloak_admin.py index 079bcd0..19c042a 100644 --- a/src/keycloak/keycloak_admin.py +++ b/src/keycloak/keycloak_admin.py @@ -8221,7 +8221,7 @@ class KeycloakAdmin: return raise_error_from_response(data_raw, KeycloakGetError) async def a_get_role_client_level_children(self, client_id, role_id): - """Get the child roles asynchronously of which the given composite client role is composed of. + """Get the child roles async of which the given composite client role is composed of. :param client_id: id of the client. :type client_id: str diff --git a/src/keycloak/keycloak_uma.py b/src/keycloak/keycloak_uma.py index 5dbe2fd..0075689 100644 --- a/src/keycloak/keycloak_uma.py +++ b/src/keycloak/keycloak_uma.py @@ -417,6 +417,11 @@ class KeycloakUMA: return raise_error_from_response(data_raw, KeycloakGetError) async def a__fetch_well_known(self): + """Get the well_known UMA2 config async. + + :returns: It lists endpoints and other configuration options relevant + :rtype: dict + """ params_path = {"realm-name": self.connection.realm_name} data_raw = await self.connection.a_raw_get(URL_UMA_WELL_KNOWN.format(**params_path)) return raise_error_from_response(data_raw, KeycloakGetError) diff --git a/tests/test_keycloak_admin.py b/tests/test_keycloak_admin.py index b8174ff..9fe8e7b 100644 --- a/tests/test_keycloak_admin.py +++ b/tests/test_keycloak_admin.py @@ -6068,7 +6068,7 @@ async def test_a_clear_realm_cache(realm: str, admin: KeycloakAdmin) -> None: @pytest.mark.asyncio -async def test_clear_user_cache(realm: str, admin: KeycloakAdmin) -> None: +async def test_a_clear_user_cache(realm: str, admin: KeycloakAdmin) -> None: """Test clearing the user cache. :param realm: Realm name