(domain, info)
return "http://github.com/NeuroTechX/moabb/blob/%s/moabb/%s%s" % (  # noqa
        kind,
        fn,
        linespec,
    )
Determine the URL corresponding to a Python object.
    Parameters
    ----------
    domain : str
        Only useful when 'py'.
    info : dict
        With keys "module" and "fullname".
    Returns
    -------
    url : str
        The code URL.
    Notes
    -----
    This has been adapted to deal with our "verbose" decorator.
    Adapted from SciPy (doc/source/conf.py).
Determine the URL corresponding to a Python object.
    Parameters
    ----------
    domain : str
        Only useful when 'py'.
    info : dict
        With keys "module" and "fullname".
    Returns
    -------
    url : str
        The code URL.
    Notes
    -----
    This has been adapted to deal with our "verbose" decorator.
    Adapted from SciPy (doc/source/conf.py).
Determine the URL corresponding to a Python object . Parameters ---------- domain : str Only useful when py . info : dict With keys module and fullname . Returns ------- url : str The code URL . Notes ----- This has been adapted to deal with our verbose decorator . Adapted from SciPy ( doc / source / conf . py ) .
def linkcode_resolve(domain, info):  # noqa: C901
    """Determine the URL corresponding to a Python object.
    Parameters
    ----------
    domain : str
        Only useful when 'py'.
    info : dict
        With keys "module" and "fullname".
    Returns
    -------
    url : str
        The code URL.
    Notes
    -----
    This has been adapted to deal with our "verbose" decorator.
    Adapted from SciPy (doc/source/conf.py).
    """
    import mne

    if domain != "py":
        return None

    modname = info["module"]
    fullname = info["fullname"]

    submod = sys.modules.get(modname)
    if submod is None:
        return None

    obj = submod
    for part in fullname.split("."):
        try:
            obj = getattr(obj, part)
        except Exception:
            return None
    # deal with our decorators properly
    while hasattr(obj, "__wrapped__"):
        obj = obj.__wrapped__

    try:
        fn = inspect.getsourcefile(obj)
    except Exception:
        fn = None
    if not fn:
        try:
            fn = inspect.getsourcefile(sys.modules[obj.__module__])
        except Exception:
            fn = None
    if not fn:
        return None
    fn = op.relpath(fn, start=op.dirname(mne.__file__))
    fn = "/".join(op.normpath(fn).split(os.sep))  # in case on Windows

    try:
        source, lineno = inspect.getsourcelines(obj)
    except Exception:
        lineno = None

    if lineno:
        linespec = "#L%d-L%d" % (lineno, lineno + len(source) - 1)
    else:
        linespec = ""

    if "dev" in moabb.__version__:
        kind = "master"
    else:
        kind = "maint/%s" % (".".join(mne.__version__.split(".")[:2]))
    return "http://github.com/NeuroTechX/moabb/blob/%s/moabb/%s%s" % (  # noqa
        kind,
        fn,
        linespec,
    )
def linkcode_resolve ( domain , info ) : # noqa: C901 import mne if domain != "py" : return None modname = info [ "module" ] fullname = info [ "fullname" ] submod = sys . modules . get ( modname ) if submod is None : return None obj = submod for part in fullname . split ( "." ) : try : obj = getattr ( obj , part ) except Exception : return None # deal with our decorators properly while hasattr ( obj , "__wrapped__" ) : obj = obj . __wrapped__ try : fn = inspect . getsourcefile ( obj ) except Exception : fn = None if not fn : try : fn = inspect . getsourcefile ( sys . modules [ obj . __module__ ] ) except Exception : fn = None if not fn : return None fn = op . relpath ( fn , start = op . dirname ( mne . __file__ ) ) fn = "/" . join ( op . normpath ( fn ) . split ( os . sep ) ) # in case on Windows try : source , lineno = inspect . getsourcelines ( obj ) except Exception : lineno = None if lineno : linespec = "#L%d-L%d" % ( lineno , lineno + len ( source ) - 1 ) else : linespec = "" if "dev" in moabb . __version__ : kind = "master" else : kind = "maint/%s" % ( "." . join ( mne . __version__ . split ( "." ) [ : 2 ] ) ) return "http://github.com/NeuroTechX/moabb/blob/%s/moabb/%s%s" % ( # noqa kind , fn , linespec , )