#NEWLINE# def get_url( bid ) : #NEWLINE# #INDENT# from bandit.core import extension_loader #NEWLINE# info = extension_loader . MANAGER . plugins_by_id . get ( bid , None ) #NEWLINE# if ( info is not None ) : #NEWLINE# #INDENT# return ( base_url + ( 'plugins/%s.html' % info . plugin . __name__ ) ) #NEWLINE# #UNINDENT# info = extension_loader . MANAGER . blacklist_by_id . get ( bid , None ) #NEWLINE# if ( info is not None ) : #NEWLINE# #INDENT# template = 'blacklists/blacklist_{kind}.html#{id}-{name}' #NEWLINE# if info [ 'id' ] . startswith ( 'B3' ) : #NEWLINE# #INDENT# ext = template . format ( kind = 'calls' , id = info [ 'id' ] , name = info [ 'name' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ext = template . format ( kind = 'imports' , id = info [ 'id' ] , name = info [ 'name' ] ) #NEWLINE# #UNINDENT# return ( base_url + ext . lower ( ) ) #NEWLINE# #UNINDENT# return base_url