Skip to content
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

Merged
merged 3 commits into from
Sep 23, 2016
Merged

Conversation

kellerza
Copy link
Member

Description:
Sort the yaml output of check_config to have a more consistent display

Checklist:

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass

@pvizeli
Copy link
Member

pvizeli commented Sep 13, 2016

LGTM 🐬

@balloob
Copy link
Member

balloob commented Sep 14, 2016

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 OrderedDict() instead.

@@ -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()):
Copy link
Member

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?

Copy link
Member Author

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()):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@balloob
Copy link
Member

balloob commented Sep 23, 2016

Looks good! 🐬

@balloob balloob merged commit de51cfb into home-assistant:dev Sep 23, 2016
tylerstraub referenced this pull request Sep 23, 2016
* Use voluptuous for input slider

* floats

* _setup_component

* Imperative mood

* CONFIG_SCHEMA

* None returns empty ensure_list

* allow_extra

* bool

* restore ensure_list behaviour
@kellerza kellerza deleted the check_config branch December 20, 2016 21:12
@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants