All checks were successful
ci/woodpecker/push/tests Pipeline was successful
Allows using different ways to retrieve hosts IP address
10 lines
283 B
Python
10 lines
283 B
Python
from importlib import import_module
|
|
from typing import Type
|
|
|
|
from transip_client.adapters import Adapter
|
|
|
|
|
|
def import_string(path: str) -> Type[Adapter]:
|
|
module_path, class_name = path.rsplit(".", 1)
|
|
module = import_module(module_path)
|
|
return getattr(module, class_name)
|