Move list_sep to powerline.lint.checks
It is the only place where it is needed.
This commit is contained in:
parent
4e3b62f547
commit
b781c72348
|
@ -10,12 +10,15 @@ from powerline.lib.unicode import unicode
|
|||
from powerline.lint.markedjson.markedvalue import MarkedUnicode
|
||||
from powerline.lint.markedjson.error import DelayedEchoErr, Mark
|
||||
from powerline.lint.selfcheck import havemarks
|
||||
from powerline.lint.context import list_sep, list_themes
|
||||
from powerline.lint.context import JStr, list_themes
|
||||
from powerline.lint.imp import WithPath, import_function, import_segment
|
||||
from powerline.lint.spec import Spec
|
||||
from powerline.lint.inspect import getconfigargspec
|
||||
|
||||
|
||||
list_sep = JStr(', ')
|
||||
|
||||
|
||||
generic_keys = set((
|
||||
'exclude_modes', 'include_modes',
|
||||
'exclude_function', 'include_function',
|
||||
|
|
|
@ -14,7 +14,6 @@ class JStr(unicode):
|
|||
|
||||
|
||||
key_sep = JStr('/')
|
||||
list_sep = JStr(', ')
|
||||
|
||||
|
||||
def list_themes(data, context):
|
||||
|
|
|
@ -9,7 +9,6 @@ from copy import copy
|
|||
from powerline.lib.unicode import unicode
|
||||
from powerline.lint.markedjson.error import echoerr, DelayedEchoErr
|
||||
from powerline.lint.selfcheck import havemarks
|
||||
from powerline.lint.context import list_sep
|
||||
|
||||
|
||||
class Spec(object):
|
||||
|
@ -77,7 +76,7 @@ class Spec(object):
|
|||
context_mark=context_mark,
|
||||
problem='{0!r} must be a {1} instance, not {2}'.format(
|
||||
value,
|
||||
list_sep.join((t.__name__ for t in types)),
|
||||
', '.join((t.__name__ for t in types)),
|
||||
type(value.value).__name__
|
||||
),
|
||||
problem_mark=value.mark
|
||||
|
|
Loading…
Reference in New Issue