1
0
Fork 0

Support style for missing value. (#1186)

* Support style for missing value.

* update changelog.

* upgrade minimal version of cli_helpers, in order to use style for null.
This commit is contained in:
laixintao 2020-05-29 06:29:50 +08:00 committed by GitHub
parent 4a98b37877
commit 0c24e8bda2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 2 deletions

View File

@ -7,6 +7,7 @@ Features:
* Make the output more compact by removing the empty newline. (Thanks: `laixintao`_)
* Add support for using [pspg](https://github.com/okbob/pspg) as a pager (#1102)
* Update python version in Dockerfile
* Support setting color for null value
Bug fixes:
----------

View File

@ -175,6 +175,7 @@ bottom-toolbar.transaction.failed = 'bg:#222222 #ff005f bold'
output.header = "#00ff5f bold"
output.odd-row = ""
output.even-row = ""
output.null = "#808080"
# Named queries are queries you can execute by name.
[named queries]

View File

@ -34,6 +34,7 @@ TOKEN_TO_PROMPT_STYLE = {
Token.Output.Header: "output.header",
Token.Output.OddRow: "output.odd-row",
Token.Output.EvenRow: "output.even-row",
Token.Output.Null: "output.null",
}
# reverse dict for cli_helpers, because they still expect Pygments tokens.
@ -52,7 +53,7 @@ def parse_pygments_style(token_name, style_object, style_dict):
try:
other_token_type = string_to_tokentype(style_dict[token_name])
return token_type, style_object.styles[other_token_type]
except AttributeError as err:
except AttributeError:
return token_type, style_dict[token_name]

View File

@ -14,7 +14,7 @@ install_requirements = [
"sqlparse >=0.3.0,<0.4",
"configobj >= 5.0.6",
"humanize >= 0.5.1",
"cli_helpers[styles] >= 1.2.0",
"cli_helpers[styles] >= 2.0.0",
]