7 Commits

Author SHA1 Message Date
ZyX
8d00ba781c Remove unneeded # NOQA comments
It appears that something has changed and it no longer complains about double
declaration in else or except blocks.
2014-09-01 00:25:24 +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
b8049fab87 Add ext.*.components configuration support
Also fixes various problems in shell bindings.

Closes #969
2014-08-10 16:26:22 +04:00
ZyX
05384e31e4 Add powerline-config shell command and use it in all shell bindings 2014-08-02 21:31:00 +04:00
ZyX
1447be1ddc Add missing imports in powerline-config
They matter when script is used without properly installing powerline, so that 
importing `powerline.bindings.config` does not work.
2014-07-23 01:47:46 +04:00
ZyX
44ce483ee5 Use powerline.shell.run_cmd to get tmux version
Closes #912
2014-07-10 21:27:42 +04:00
ZyX
7b1d7bbb9e Use scripts/powerline-config to source tmux configuration
Ref #872
2014-05-24 13:45:21 +04:00