<s> import sublime_plugin <EOL> from collections import namedtuple <EOL> MENU = namedtuple ( "<STR_LIT>" , "<STR_LIT>" ) ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ) <EOL> class BhRemoveBracketsCommand ( sublime_plugin . WindowCommand ) : <EOL> """<STR_LIT>""" <EOL> def remove_brackets ( self , value ) : <EOL> """<STR_LIT>""" <EOL> if value != - <NUM_LIT:1> : <EOL> menu_item = MENU [ value ] <EOL> indent = menu_item == MENU . block_indent <EOL> block = menu_item == MENU . block or menu_item == MENU . block_indent <EOL> content = menu_item == MENU . content <EOL> self . window . run_command ( <EOL> "<STR_LIT>" , <EOL> { <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT:type>" : [ "<STR_LIT>" ] , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT:args>" : { <EOL> "<STR_LIT>" : indent , <EOL> "<STR_LIT>" : block , <EOL> "<STR_LIT>" : content <EOL> } <EOL> } <EOL> } <EOL> ) <EOL> def run ( self ) : <EOL> """<STR_LIT>""" <EOL> self . window . show_quick_panel ( <EOL> list ( MENU ) , <EOL> self . remove_brackets <EOL> ) </s>
