1
0
mirror of https://github.com/httpie/cli.git synced 2026-02-20 23:08:09 +02:00

Improve startup time with lazy loading some args (#1221)

* Improve startup time with lazy loading some args

* add some tests

* Add changelog entry

* Update CHANGELOG.md

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
This commit is contained in:
Batuhan Taskaya
2021-12-01 21:15:59 +03:00
committed by GitHub
parent ba8e4097e8
commit 151becec2b
5 changed files with 193 additions and 43 deletions

View File

@@ -28,9 +28,14 @@ if is_windows:
# great and fruity seems to give the best result there.
DEFAULT_STYLE = 'fruity'
AVAILABLE_STYLES = set(pygments.styles.get_all_styles())
AVAILABLE_STYLES.add(SOLARIZED_STYLE)
AVAILABLE_STYLES.add(AUTO_STYLE)
BUNDLED_STYLES = {
SOLARIZED_STYLE,
AUTO_STYLE
}
def get_available_styles():
return BUNDLED_STYLES | set(pygments.styles.get_all_styles())
class ColorFormatter(FormatterPlugin):