-
-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sorted yaml output for check_config #3354
Conversation
6aa0897
to
803e4f7
Compare
LGTM 🐬 |
Wouldn't it be nicer if all errors are ordered to the same order as they occur in the config? To achieve that, replace these lines to assign |
803e4f7
to
793dadd
Compare
@@ -105,26 +106,26 @@ def run(script_args: List) -> int: | |||
|
|||
if len(res['except']) > 0: | |||
print(color('bold_white', 'Failed config')) | |||
for domain, config in res['except'].items(): | |||
for domain, config in sorted(res['except'].items()): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By using sorted
you're overriding the order of the items in the config, is this on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overlooked the impact of your OrderedDict suggestion. Fixed
print(color('reset')) | ||
|
||
if domain_info: | ||
if 'all' in domain_info: | ||
print(color('bold_white', 'Successful config (all)')) | ||
for domain, config in res['components'].items(): | ||
for domain, config in sorted(res['components'].items()): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
793dadd
to
a11509a
Compare
a11509a
to
ec59804
Compare
Looks good! 🐬 |
* Use voluptuous for input slider * floats * _setup_component * Imperative mood * CONFIG_SCHEMA * None returns empty ensure_list * allow_extra * bool * restore ensure_list behaviour
Description:
Sort the yaml output of check_config to have a more consistent display
Checklist:
If the code does not interact with devices:
tox
run successfully. Your PR cannot be merged unless tests pass