def _get_pygments_extensions():
 import pygments.lexers as lexers
 extensions = []
 for lx in lexers.get_all_lexers():
  lexer_exts = lx[2]
  if lexer_exts:
   other_exts = [le for le in lexer_exts if (not le.startswith('*'))]
   lexer_exts = [le[1:] for le in lexer_exts if le.startswith('*')]
   lexer_exts = [le for le in lexer_exts if (not le.endswith('_*'))]
   extensions = ((extensions + list(lexer_exts)) + list(other_exts))
 return sorted(list(set(extensions)))

def _get_pygments_extensions ( ) : import pygments . lexers as lexers extensions = [ ] for lx in lexers . get_all_lexers ( ) : lexer_exts = lx [ 2 ] if lexer_exts : other_exts = [ le for le in lexer_exts if ( not le . startswith ( '*' ) ) ] lexer_exts = [ le [ 1 : ] for le in lexer_exts if le . startswith ( '*' ) ] lexer_exts = [ le for le in lexer_exts if ( not le . endswith ( '_*' ) ) ] extensions = ( ( extensions + list ( lexer_exts ) ) + list ( other_exts ) ) return sorted ( list ( set ( extensions ) ) )
return all file type extensions supported by pygments .