From aeb1a32a33a5638934b1679e8ca977cce61fff4b Mon Sep 17 00:00:00 2001 From: ZyX Date: Sat, 20 Sep 2014 00:17:59 +0400 Subject: [PATCH] Document powerline.lint.check function --- powerline/lint/__init__.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/powerline/lint/__init__.py b/powerline/lint/__init__.py index 55f7a414..49cb511a 100644 --- a/powerline/lint/__init__.py +++ b/powerline/lint/__init__.py @@ -290,6 +290,24 @@ theme_spec = common_theme_spec().update( def check(paths=None, debug=False, echoerr=echoerr, require_ext=None): + '''Check configuration sanity + + :param list paths: + Paths from which configuration should be loaded. + :param bool debug: + Determines whether some information useful for debugging linter should + be output. + :param function echoerr: + Function that will be used to echo the error(s). Should accept four + optional keyword parameters: ``problem`` and ``problem_mark``, and + ``context`` and ``context_mark``. + :param str require_ext: + Require configuration for some extension to be present. + + :return: + ``False`` if user configuration seems to be completely sane and ``True`` + if some problems were found. + ''' search_paths = paths or get_config_paths() find_config_files = generate_config_finder(lambda: search_paths)