def linkcode_resolve(domain, info):
if domain != '<STR_LIT>' or not info['<STR_LIT>']:<EOL><INDENT>return None<EOL><DEDENT>filename = info['<STR_LIT>'].replace('<STR_LIT:.>', '<STR_LIT:/>')<EOL>mod = importlib.import_module(info['<STR_LIT>'])<EOL>basename = os.path.splitext(mod.__file__)[<NUM_LIT:0>]<EOL>if basename.endswith('<STR_LIT>'):<EOL><INDENT>filename += '<STR_LIT>'<EOL><DEDENT>item = mod<EOL>lineno = '<STR_LIT>'<EOL>for piece in info['<STR_LIT>'].split('<STR_LIT:.>'):<EOL><INDENT>item = getattr(item, piece)<EOL>try:<EOL><INDENT>lineno = '<STR_LIT>' % inspect.getsourcelines(item)[<NUM_LIT:1>]<EOL><DEDENT>except (TypeError, IOError):<EOL><INDENT>pass<EOL><DEDENT><DEDENT>return ("<STR_LIT>" %<EOL>(github_user, project, release, filename, lineno))<EOL>
Link source code to github