Skip to content

Commit d44a2af

Browse files
author
Phillip Simonds
committed
Make async init method not assign client.
The client is assigned now via the cached_property.
1 parent 5453e51 commit d44a2af

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

infrahub_sdk/transforms.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,7 @@ async def init(cls, client: Optional[InfrahubClient] = None, *args: Any, **kwarg
5656
stacklevel=1,
5757
)
5858

59-
item = cls(*args, **kwargs)
60-
61-
if client:
62-
item.client = client
63-
else:
64-
item.client = InfrahubClient(address=item.server_url)
65-
66-
return item
59+
return cls(*args, **kwargs)
6760

6861
@property
6962
def branch_name(self) -> str:

0 commit comments

Comments
 (0)