Commit Graph

11 Commits

Author SHA1 Message Date
Foo ff49538c04 Do not leak environment and home directory in documentation
Fixes #1329
2015-03-11 22:49:36 +03: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 f4e49e2ee6 Make powerline autodoc add all Segments 2014-08-24 19:50:54 +04:00
ZyX 7e57010c19 Move some code from powerline_autodoc to powerline.lib.inspect
To make it available later in lint checker.
2013-04-13 00:09:00 +04:00
ZyX 587789ebda Fix documentation for ThreadedSegment classes with @staticmethod’s 2013-04-12 23:45:47 +04:00
ZyX 9250d794d7 Remove `pl` argument and first argument to `render*` from docs 2013-04-12 23:45:47 +04:00
ZyX 1351207462 Some fixes for flake8 2013-03-24 19:59:56 +04:00
ZyX a021916428 Make update_first configurable 2013-03-24 19:35:25 +04:00
ZyX 674a211cda Remove escape sequences from default strings in documentation
Note: to properly view some values in browser you need the browser to use 
patched font or fontconfig. Though there is not much difference between some 
cryptic escape sequence and singe wrongly displayed character.
2013-03-17 22:26:57 +04:00
ZyX 34fba2286a Fix documentation for wrapped functions 2013-03-17 22:07:27 +04:00
ZyX 19b45e609a Fix documentation for threaded segments 2013-03-17 22:06:52 +04:00