mirror of
https://github.com/powerline/powerline.git
synced 2025-07-26 07:16:31 +02:00
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.markedvalue import MarkedUnicode
|
||||||
from powerline.lint.markedjson.error import DelayedEchoErr, Mark
|
from powerline.lint.markedjson.error import DelayedEchoErr, Mark
|
||||||
from powerline.lint.selfcheck import havemarks
|
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.imp import WithPath, import_function, import_segment
|
||||||
from powerline.lint.spec import Spec
|
from powerline.lint.spec import Spec
|
||||||
from powerline.lint.inspect import getconfigargspec
|
from powerline.lint.inspect import getconfigargspec
|
||||||
|
|
||||||
|
|
||||||
|
list_sep = JStr(', ')
|
||||||
|
|
||||||
|
|
||||||
generic_keys = set((
|
generic_keys = set((
|
||||||
'exclude_modes', 'include_modes',
|
'exclude_modes', 'include_modes',
|
||||||
'exclude_function', 'include_function',
|
'exclude_function', 'include_function',
|
||||||
|
@ -14,7 +14,6 @@ class JStr(unicode):
|
|||||||
|
|
||||||
|
|
||||||
key_sep = JStr('/')
|
key_sep = JStr('/')
|
||||||
list_sep = JStr(', ')
|
|
||||||
|
|
||||||
|
|
||||||
def list_themes(data, context):
|
def list_themes(data, context):
|
||||||
|
@ -9,7 +9,6 @@ from copy import copy
|
|||||||
from powerline.lib.unicode import unicode
|
from powerline.lib.unicode import unicode
|
||||||
from powerline.lint.markedjson.error import echoerr, DelayedEchoErr
|
from powerline.lint.markedjson.error import echoerr, DelayedEchoErr
|
||||||
from powerline.lint.selfcheck import havemarks
|
from powerline.lint.selfcheck import havemarks
|
||||||
from powerline.lint.context import list_sep
|
|
||||||
|
|
||||||
|
|
||||||
class Spec(object):
|
class Spec(object):
|
||||||
@ -77,7 +76,7 @@ class Spec(object):
|
|||||||
context_mark=context_mark,
|
context_mark=context_mark,
|
||||||
problem='{0!r} must be a {1} instance, not {2}'.format(
|
problem='{0!r} must be a {1} instance, not {2}'.format(
|
||||||
value,
|
value,
|
||||||
list_sep.join((t.__name__ for t in types)),
|
', '.join((t.__name__ for t in types)),
|
||||||
type(value.value).__name__
|
type(value.value).__name__
|
||||||
),
|
),
|
||||||
problem_mark=value.mark
|
problem_mark=value.mark
|
||||||
|
Loading…
x
Reference in New Issue
Block a user