Fix various flake8 errors

This commit is contained in:
ZyX 2013-02-24 13:37:50 +04:00 committed by Kim Silkebækken
parent c8c713321d
commit 168f4854c1
4 changed files with 32 additions and 30 deletions

View File

@ -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

View File

@ -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):

View File

@ -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=','):