authomatic/core.py
def resolve_provider_class(class_):
    """
    Returns a provider class.

    :param class_name: :class:`string` or
    :class:`authomatic.providers.BaseProvider` subclass.

    """

    if isinstance(class_, str):
        # prepare path for authomatic.providers package
        path = '.'.join([__package__, 'providers', class_])

        # try to import class by string from providers module or by fully
        # qualified path
        return import_string(class_, True) or import_string(path)
    else:
        return class_
def resolve_provider_class(class_):
    if isinstance(class_, str):
        # prepare path for authomatic.providers package
        path = '.'.join([__package__, 'providers', class_])

        # try to import class by string from providers module or by fully
        # qualified path
        return import_string(class_, True) or import_string(path)
    else:
        return class_
def resolve_provider_class ( class_ ) : if isinstance ( class_ , str ) : # prepare path for authomatic.providers package path = '.' . join ( [ __package__ , 'providers' , class_ ] ) # try to import class by string from providers module or by fully # qualified path return import_string ( class_ , True ) or import_string ( path ) else : return class_
Returns a provider class.

    :param class_name: :class:`string` or
    :class:`authomatic.providers.BaseProvider` subclass.
Returns a provider class .