Skip to content

Commit 3b96e45

Browse files
committed
fixed double client and formatting as well
1 parent 3885a46 commit 3b96e45

6 files changed

Lines changed: 16 additions & 19 deletions

File tree

pyatlan/client/aio/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from .file import AsyncFileClient
3636
from .group import AsyncGroupClient
3737
from .impersonate import AsyncImpersonationClient
38-
from .oauth_client import AsyncOAuthClientClient
38+
from .oauth_client import AsyncOAuthClient
3939
from .open_lineage import AsyncOpenLineageClient
4040
from .query import AsyncQueryClient
4141
from .role import AsyncRoleClient
@@ -62,7 +62,7 @@
6262
"AsyncImpersonationClient",
6363
"AsyncIndexSearchResults",
6464
"AsyncLineageListResults",
65-
"AsyncOAuthClientClient",
65+
"AsyncOAuthClient",
6666
"AsyncOpenLineageClient",
6767
"AsyncQueryClient",
6868
"AsyncRoleClient",

pyatlan/client/aio/client.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
from pyatlan.client.aio.group import AsyncGroupClient
4343
from pyatlan.client.aio.impersonate import AsyncImpersonationClient
4444
from pyatlan.client.aio.oauth import AsyncOAuthTokenManager
45-
from pyatlan.client.aio.oauth_client import AsyncOAuthClientClient
45+
from pyatlan.client.aio.oauth_client import AsyncOAuthClient
4646
from pyatlan.client.aio.open_lineage import AsyncOpenLineageClient
4747
from pyatlan.client.aio.query import AsyncQueryClient
4848
from pyatlan.client.aio.role import AsyncRoleClient
@@ -114,9 +114,7 @@ class AsyncAtlanClient(AtlanClient):
114114
_async_sso_client: Optional[AsyncSSOClient] = PrivateAttr(default=None)
115115
_async_task_client: Optional[AsyncTaskClient] = PrivateAttr(default=None)
116116
_async_token_client: Optional[AsyncTokenClient] = PrivateAttr(default=None)
117-
_async_oauth_client_client: Optional[AsyncOAuthClientClient] = PrivateAttr(
118-
default=None
119-
)
117+
_async_oauth_client_client: Optional[AsyncOAuthClient] = PrivateAttr(default=None)
120118
_async_typedef_client: Optional[AsyncTypeDefClient] = PrivateAttr(default=None)
121119
_async_user_client: Optional[AsyncUserClient] = PrivateAttr(default=None)
122120
_async_workflow_client: Optional[AsyncWorkflowClient] = PrivateAttr(default=None)
@@ -367,10 +365,10 @@ def token(self) -> AsyncTokenClient: # type: ignore[override]
367365
return self._async_token_client
368366

369367
@property
370-
def oauth_client(self) -> AsyncOAuthClientClient: # type: ignore[override]
368+
def oauth_client(self) -> AsyncOAuthClient: # type: ignore[override]
371369
"""Get async OAuth client client with same API as sync"""
372370
if self._async_oauth_client_client is None:
373-
self._async_oauth_client_client = AsyncOAuthClientClient(self) # type: ignore[arg-type]
371+
self._async_oauth_client_client = AsyncOAuthClient(self) # type: ignore[arg-type]
374372
return self._async_oauth_client_client
375373

376374
@property

pyatlan/client/aio/oauth_client.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,10 @@
1818
)
1919
from pyatlan.errors import ErrorCode
2020
from pyatlan.model.aio.oauth_client import AsyncOAuthClientListResponse
21-
from pyatlan.model.oauth_client import (
22-
OAuthClientCreateResponse,
23-
OAuthClientResponse,
24-
)
21+
from pyatlan.model.oauth_client import OAuthClientCreateResponse, OAuthClientResponse
2522

2623

27-
class AsyncOAuthClientClient:
24+
class AsyncOAuthClient:
2825
"""
2926
Async client for managing OAuth client credentials.
3027
"""

pyatlan/client/atlan.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
from pyatlan.client.group import GroupClient
5050
from pyatlan.client.impersonate import ImpersonationClient
5151
from pyatlan.client.oauth import OAuthTokenManager
52-
from pyatlan.client.oauth_client import OAuthClientClient
52+
from pyatlan.client.oauth_client import OAuthClient
5353
from pyatlan.client.open_lineage import OpenLineageClient
5454
from pyatlan.client.query import QueryClient
5555
from pyatlan.client.role import RoleClient
@@ -152,7 +152,7 @@ class AtlanClient(BaseSettings):
152152
_asset_client: Optional[AssetClient] = PrivateAttr(default=None)
153153
_typedef_client: Optional[TypeDefClient] = PrivateAttr(default=None)
154154
_token_client: Optional[TokenClient] = PrivateAttr(default=None)
155-
_oauth_client_client: Optional[OAuthClientClient] = PrivateAttr(default=None)
155+
_oauth_client_client: Optional[OAuthClient] = PrivateAttr(default=None)
156156
_user_client: Optional[UserClient] = PrivateAttr(default=None)
157157
_impersonate_client: Optional[ImpersonationClient] = PrivateAttr(default=None)
158158
_query_client: Optional[QueryClient] = PrivateAttr(default=None)
@@ -346,9 +346,9 @@ def token(self) -> TokenClient:
346346
return self._token_client
347347

348348
@property
349-
def oauth_client(self) -> OAuthClientClient:
349+
def oauth_client(self) -> OAuthClient:
350350
if self._oauth_client_client is None:
351-
self._oauth_client_client = OAuthClientClient(client=self)
351+
self._oauth_client_client = OAuthClient(client=self)
352352
return self._oauth_client_client
353353

354354
@property

pyatlan/client/oauth_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
)
2424

2525

26-
class OAuthClientClient:
26+
class OAuthClient:
2727
"""
2828
This class can be used to manage OAuth client credentials.
2929
This class does not need to be instantiated directly but can be

pyatlan/model/oauth_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ def current_page(self) -> Optional[List[OAuthClientResponse]]:
155155
"""Get the current page of OAuth clients."""
156156
return self.records
157157

158-
def next_page(self, start: Optional[int] = None, size: Optional[int] = None) -> bool:
158+
def next_page(
159+
self, start: Optional[int] = None, size: Optional[int] = None
160+
) -> bool:
159161
"""
160162
Retrieve the next page of results.
161163

0 commit comments

Comments
 (0)