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
.
What was done:
- Implemented loading using configuration hierarhy as proposed in the issue
- Implemented group aliasing
What was not:
- Some tests (config_reload) are failing
- Other (test_configuration) are spamming console with unexpected messages
- No support for powerline-lint
- No tests for new functionality
- Specifically I have not checked whether group aliasing actually works
- Colorschemes were not ported
Some other things: I have named this branch `config-ng` because I have other
ideas about configuration and it would be good to include them making only one
possibly backwards-incompatible merge commit instead of many. Specifically I am
going to rebase `merge-config` branch here.
Also moves functions from tests.test_config_reload to tests.lib.config_mock
Using create_renderer for vim results in vim access from a separate thread.
Currently only:
- Test for not reloading configuration if run_once is not True
- Test for reloading main configuration and other configurations triggered by
changes in main configuration file
TODO: tests for all other configuration files reloading (colors, colorscheme,
theme).