diff options
| author | Loic Bistuer <loic.bistuer@gmail.com> | 2014-10-21 15:31:24 +0700 |
|---|---|---|
| committer | Loic Bistuer <loic.bistuer@gmail.com> | 2014-10-22 11:27:00 +0700 |
| commit | eb82fb0a9d14ca317d366afb65e21d742bbe46a5 (patch) | |
| tree | 5105e3d635f823ba47753ae6fbbfe9213ba1f353 /docs | |
| parent | bdb4118b1ad166e2d02f725354ca1c1021976cb5 (diff) | |
Refactored color_style() and no_style() to improve testability. Refs #23663.
This includes the following improvements:
- The type of the style object is now called 'Style' rather than 'dummy'.
- The new make_style() function allows generating a Style object directly
from a config string. Before the only way to get a style object was
through the environ and it also required that the terminal supported
colors which isn't necessarily the case when testing.
- The output of no_style() is now cached with @lru_cache.
- The output of no_style() now has the same set of attributes as the
other Style objects. Previously it allowed anything to pass through
with __getattr__.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions
