How to use the aiogoogle.auth.abc.AbstractOpenIdConnectManager function in aiogoogle

To help you get started, we’ve selected a few aiogoogle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github omarryhan / aiogoogle / aiogoogle / auth / abc.py View on Github external
def __new__(cls, *args, **kwargs):
        # Get all coros of this the abstract class
        parent_abstract_coros = inspect.getmembers(
            AbstractOpenIdConnectManager, predicate=inspect.iscoroutinefunction
        )

        # Ensure all relevant child methods are implemented as coros
        for coro in parent_abstract_coros:
            coro_name = coro[0]
            child_method = getattr(cls, coro_name)
            if not inspect.iscoroutinefunction(child_method):
                raise RuntimeError(f"{child_method} must be a coroutine")

        # Resume with normal behavior of a Python constructor
        return super(AbstractOpenIdConnectManager, cls).__new__(cls)
github omarryhan / aiogoogle / aiogoogle / auth / abc.py View on Github external
def __new__(cls, *args, **kwargs):
        # Get all coros of this the abstract class
        parent_abstract_coros = inspect.getmembers(
            AbstractOpenIdConnectManager, predicate=inspect.iscoroutinefunction
        )

        # Ensure all relevant child methods are implemented as coros
        for coro in parent_abstract_coros:
            coro_name = coro[0]
            child_method = getattr(cls, coro_name)
            if not inspect.iscoroutinefunction(child_method):
                raise RuntimeError(f"{child_method} must be a coroutine")

        # Resume with normal behavior of a Python constructor
        return super(AbstractOpenIdConnectManager, cls).__new__(cls)