parent
de064558a1
commit
1451b4261f
|
@ -112,7 +112,7 @@ use ``c.Powerline.KEY``. Supported ``KEY`` strings or keyword argument names:
|
|||
a dictionary where keys are theme names and values are dictionaries which
|
||||
will be recursively merged with the contents of the given theme.
|
||||
|
||||
``paths``
|
||||
``config_paths``
|
||||
Sets directories where configuration should be read from. If present, no
|
||||
default locations are searched for configuration. No expansions are
|
||||
performed thus you cannot use paths starting with ``~/``.
|
||||
|
|
|
@ -72,7 +72,7 @@ class ConfigurableIPythonPowerline(IPythonPowerline):
|
|||
config = ip.config.Powerline
|
||||
self.config_overrides = config.get('config_overrides')
|
||||
self.theme_overrides = config.get('theme_overrides', {})
|
||||
self.paths = config.get('paths')
|
||||
self.config_paths = config.get('config_paths')
|
||||
super(ConfigurableIPythonPowerline, self).init()
|
||||
|
||||
def do_setup(self, ip, shutdown_hook):
|
||||
|
|
|
@ -95,10 +95,10 @@ class PowerlinePrompt2(PowerlinePromptOut):
|
|||
|
||||
|
||||
class ConfigurableIPythonPowerline(IPythonPowerline):
|
||||
def init(self, config_overrides=None, theme_overrides={}, paths=None):
|
||||
def init(self, config_overrides=None, theme_overrides={}, config_paths=None):
|
||||
self.config_overrides = config_overrides
|
||||
self.theme_overrides = theme_overrides
|
||||
self.paths = paths
|
||||
self.config_paths = config_paths
|
||||
super(ConfigurableIPythonPowerline, self).init()
|
||||
|
||||
def ipython_magic(self, ip, parameter_s=''):
|
||||
|
|
|
@ -32,8 +32,8 @@ class IPythonPowerline(Powerline):
|
|||
)
|
||||
|
||||
def get_config_paths(self):
|
||||
if self.paths:
|
||||
return self.paths
|
||||
if self.config_paths:
|
||||
return self.config_paths
|
||||
else:
|
||||
return super(IPythonPowerline, self).get_config_paths()
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ class TestConfig(TestCase):
|
|||
from powerline.ipython import IPythonPowerline
|
||||
|
||||
class IpyPowerline(IPythonPowerline):
|
||||
paths = None
|
||||
config_paths = None
|
||||
config_overrides = None
|
||||
theme_overrides = {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue