Fix various flake8 errors
This commit is contained in:
parent
c8c713321d
commit
168f4854c1
|
@ -28,6 +28,9 @@ class ConfigurableIpythonPowerline(IpythonPowerline):
|
||||||
super(ConfigurableIpythonPowerline, self).__init__()
|
super(ConfigurableIpythonPowerline, self).__init__()
|
||||||
|
|
||||||
|
|
||||||
|
old_prompt_manager = None
|
||||||
|
|
||||||
|
|
||||||
def load_ipython_extension(ip):
|
def load_ipython_extension(ip):
|
||||||
global old_prompt_manager
|
global old_prompt_manager
|
||||||
|
|
||||||
|
@ -37,5 +40,6 @@ def load_ipython_extension(ip):
|
||||||
ip.prompt_manager = PowerlinePromptManager(powerline=powerline,
|
ip.prompt_manager = PowerlinePromptManager(powerline=powerline,
|
||||||
shell=ip.prompt_manager.shell, config=ip.prompt_manager.config)
|
shell=ip.prompt_manager.shell, config=ip.prompt_manager.config)
|
||||||
|
|
||||||
|
|
||||||
def unload_ipython_extension(ip):
|
def unload_ipython_extension(ip):
|
||||||
ip.prompt_manager = old_prompt_manager
|
ip.prompt_manager = old_prompt_manager
|
||||||
|
|
|
@ -95,7 +95,7 @@ class Colorscheme(object):
|
||||||
if gradient_level is None:
|
if gradient_level is None:
|
||||||
pick_color = self.colors.__getitem__
|
pick_color = self.colors.__getitem__
|
||||||
else:
|
else:
|
||||||
pick_color = lambda gradient : self.get_gradient(gradient, gradient_level)
|
pick_color = lambda gradient: self.get_gradient(gradient, gradient_level)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'fg': pick_color(group_props['fg']),
|
'fg': pick_color(group_props['fg']),
|
||||||
|
|
|
@ -4,7 +4,6 @@ import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from powerline.lib import memoize, urllib_read, urllib_urlencode, add_divider_highlight_group
|
from powerline.lib import memoize, urllib_read, urllib_urlencode, add_divider_highlight_group
|
||||||
from functools import wraps
|
|
||||||
|
|
||||||
|
|
||||||
def hostname(only_if_ssh=False):
|
def hostname(only_if_ssh=False):
|
||||||
|
|
|
@ -266,8 +266,7 @@ def col_current(segment_info):
|
||||||
def virtcol_current():
|
def virtcol_current():
|
||||||
'''Return current visual column with concealed characters ingored'''
|
'''Return current visual column with concealed characters ingored'''
|
||||||
return [{'contents': vim_funcs['virtcol']('.'),
|
return [{'contents': vim_funcs['virtcol']('.'),
|
||||||
'highlight_group': ['virtcol_current', 'col_current'],
|
'highlight_group': ['virtcol_current', 'col_current']}]
|
||||||
}]
|
|
||||||
|
|
||||||
|
|
||||||
def modified_buffers(text=u'+', join_str=','):
|
def modified_buffers(text=u'+', join_str=','):
|
||||||
|
|
Loading…
Reference in New Issue