Skip to content

task: Remove previously deprecated InfrahubCheck.init() method #138

Description

@ogenstad

Component

Python SDK

Task Description

In version 2.0 of the SDK we should remove the InfrahubCheck.init() method:

@classmethod
async def init(cls, client: Optional[InfrahubClient] = None, *args: Any, **kwargs: Any) -> InfrahubCheck:
"""Async init method, If an existing InfrahubClient client hasn't been provided, one will be created automatically."""
warnings.warn(
"InfrahubCheck.init has been deprecated and will be removed in the version in Infrahub SDK 2.0.0",
DeprecationWarning,
stacklevel=1,
)
if not client:
client_module = importlib.import_module("infrahub_sdk.client")
client_class = getattr(client_module, _client_class)
client = client_class()
kwargs["client"] = client
return cls(*args, **kwargs)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowThis issue should be completed in a couple of hourstype/taskBody of work related to an epic

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions