Improve linter coding style
This commit is contained in:
parent
6cc86c825e
commit
f89744209f
|
@ -8,6 +8,7 @@ from powerline.segments.vim import vim_modes
|
|||
from powerline.lint.inspect import getconfigargspec
|
||||
from powerline.lib.threaded import ThreadedSegment
|
||||
from powerline.lib import mergedicts_copy
|
||||
from powerline.lib.unicode import unicode
|
||||
import itertools
|
||||
import sys
|
||||
import os
|
||||
|
@ -17,12 +18,6 @@ from copy import copy
|
|||
import logging
|
||||
|
||||
|
||||
try:
|
||||
from __builtin__ import unicode
|
||||
except ImportError:
|
||||
unicode = str
|
||||
|
||||
|
||||
def open_file(path):
|
||||
return open(path, 'rb')
|
||||
|
||||
|
@ -1078,8 +1073,8 @@ def list_themes(data, context):
|
|||
is_main_theme = (data['theme'] == main_theme_name)
|
||||
if theme_type == 'top':
|
||||
return list(itertools.chain(*[
|
||||
[(ext, theme) for theme in theme_configs.values()]
|
||||
for ext, theme_configs in data['theme_configs'].items()
|
||||
[(theme_ext, theme) for theme in theme_configs.values()]
|
||||
for theme_ext, theme_configs in data['theme_configs'].items()
|
||||
]))
|
||||
elif theme_type == 'main' or is_main_theme:
|
||||
return [(ext, theme) for theme in data['ext_theme_configs'].values()]
|
||||
|
|
Loading…
Reference in New Issue