Support ~/ directories in powerline-lint
This commit is contained in:
parent
2758c349db
commit
5ccf8d2cb4
|
@ -1,3 +1,5 @@
|
|||
# vim:fileencoding=utf-8:noet
|
||||
|
||||
from powerline.lint.markedjson import load
|
||||
from powerline import find_config_file, Powerline
|
||||
from powerline.lib.config import load_json_config
|
||||
|
@ -436,9 +438,9 @@ main_spec = (Spec(
|
|||
term_truecolor=Spec().type(bool).optional(),
|
||||
# Python is capable of loading from zip archives. Thus checking path
|
||||
# only for existence of the path, not for it being a directory
|
||||
paths=Spec().list((lambda value, *args: (True, True, not os.path.exists(value.value))),
|
||||
paths=Spec().list((lambda value, *args: (True, True, not os.path.exists(os.path.expanduser(value.value)))),
|
||||
lambda value: 'path does not exist: {0}'.format(value)).optional(),
|
||||
log_file=Spec().type(str).func(lambda value, *args: (True, True, not os.path.isdir(os.path.dirname(value))),
|
||||
log_file=Spec().type(str).func(lambda value, *args: (True, True, not os.path.isdir(os.path.dirname(os.path.expanduser(value)))),
|
||||
lambda value: 'directory does not exist: {0}'.format(os.path.dirname(value))).optional(),
|
||||
log_level=Spec().re('^[A-Z]+$').func(lambda value, *args: (True, True, not hasattr(logging, value)),
|
||||
lambda value: 'unknown debugging level {0}'.format(value)).optional(),
|
||||
|
|
Loading…
Reference in New Issue