Commit Graph

6 Commits

Author SHA1 Message Date
ZyX 9b03ff6936 Also add documentation for `powerline-lint` 2014-10-25 22:03:33 +04:00
ZyX 06211cbe63 Unify imports
Now imports follow the following structure:

1. __future__ line: exactly one line allowed:

        from __future__ import (unicode_literals, division, absolute_import, print_function)

   (powerline.shell is the only exception due to problems with argparse).
2. Standard python library imports in a form `import X`.
3. Standard python library imports in a form `from X import Y`.
4. and 5. 2. and 3. for third-party (non-python and non-powerline imports).
6. 3. for powerline non-test imports.
7. and 8. 2. and 3. for powerline testing module imports.

Each list entry is separated by exactly one newline from another import. If
there is module docstring it goes between `# vim:` comment and `__future__`
import. So the structure containing all items is the following:

    #!/usr/bin/env python
    # vim:fileencoding=utf-8:noet

    '''Powerline super module'''

    import sys

    from argparse import ArgumentParser

    import psutil

    from colormath.color_diff import delta_e_cie2000

    from powerline.lib.unicode import u

    import tests.vim as vim_module

    from tests import TestCase

.
2014-09-01 00:25:24 +04:00
ZyX 3d1f9bfbbd Allow multiple arguments to `powerline[-lint] --config_path` 2014-08-03 22:22:59 +04:00
ZyX b5f051f71c Fix powerline-lint tests
Some notes on the commit:

1. As external_ip and email_imap_alert segments seem to be removed corresponding
   segment_data keys also were removed.
2. Various files that import vim module now have the usual workaround that sets
   vim local to dummy object on error.
3. Syntastic check was failing because it did not specify which highlighting
   groups it uses in documentation. I made it specify them and also moved format
   strings to keywords. Same for some other plugin-local themes.
4. powerline-lint script got --debug argument. Pretty useless currently though:
   it only makes it output traceback for ImportError when failing to import
   module to stderr.
5. Moved themes/vim/plugin/*.json to themes/vim/plugin_*.json.
6. Fixed powerline-lint that ignored problems from values.
2013-11-03 01:48:16 +04:00
ZyX b883ac6ee8 Use same modeline in scripts/* as in other files 2013-04-13 19:34:55 +04:00
ZyX d27f7a0411 Add most configuration checks
Changes:

- Add main configuration, colors.json, almost full themes and colorschemes
  checks
- Make powerline.lint.check return whether it had problems
- Make powerline-lint fail if .check reported problems
- Make tests run powerline-lint
- Add the script to the list of the installed scripts

Fixes #278
2013-03-11 19:17:18 +04:00