Source code for ansible_aap_api_client.interfaces.runable

"""
Runable interface
"""

from abc import ABC, abstractmethod


[docs] class Runable(ABC): # pylint: disable=too-few-public-methods """Interface for a runable object"""
[docs] @abstractmethod def run(self, *args, **kwargs) -> None: """Abstract method to run an object :param args: Arguments :param kwargs: Keyword arguments :returns: Nothing """
[docs] class AsyncRunable(ABC): # pylint: disable=too-few-public-methods """Interface for a runable object"""
[docs] @abstractmethod async def run(self, *args, **kwargs) -> None: """Abstract method to run an object asynchronously :param args: Arguments :param kwargs: Keyword arguments :returns: Nothing """